/* ===== Shared Layout ===== */

:root{
  --bg:#e8dbc8;
  --panel:#f6ecde;
  --panel-inner:#ead8bf;

  --brown-dark:#4c3a2a;
  --brown:#7a5a3a;
  --brown-light:#b08a63;

  --accent:#c99b6b;
  --accent-soft:#d9b589;

  --text:#3a2c20;
  --muted:#6a5644;

  --shadow:0 6px 16px rgba(0,0,0,0.10);
}

*{
  box-sizing:border-box;
}

html, body{
  margin:0;
  padding:0;
}

body{
  background:var(--bg);
  font-family:'Nunito', sans-serif;
  color:var(--text);
  line-height:1.5;
}

.auth-pending:not(.page-index) .page-grid,
.auth-pending:not(.page-index) .footer,
.auth-pending:not(.page-index) #page-content{
  visibility:hidden;
}

.site-shell{
  max-width:1200px;
  margin:0 auto;
  padding:20px;
}

.panel{
  background:var(--panel);
  border-radius:14px;
  box-shadow:var(--shadow, 0 6px 16px rgba(0,0,0,0.10));
  margin-bottom:20px;
  max-width:100%;
  padding:20px;
}

.panel h2{
  margin-top:0;
  margin-bottom:12px;
  font-family:'Bree Serif', serif;
  color:var(--brown-dark);
}

p{
  margin:0 0 12px;
}

.panel p:last-child{
  margin-bottom:0;
}

.hero-home-link{
  display:block;
  color:inherit;
  text-decoration:none;
}

.hero-header{
  padding:0;
  overflow:hidden;
  margin-bottom:18px;
}

.hero-banner{
  position:relative;
}

.hero-banner-image{
  width:100%;
  height:260px;
  object-fit:cover;
  display:block;
  filter:saturate(0.92) contrast(1.03);
}

.hero-banner-overlay{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(
    to bottom,
    rgba(0,0,0,0.12),
    rgba(0,0,0,0.34)
  );
}

.hero-brand{
  display:flex;
  align-items:center;
  gap:12px;
  background:rgba(246,236,222,0.92);
  padding:12px 24px;
  border-radius:14px;
  box-shadow:0 4px 12px rgba(0,0,0,0.12);
}

.hero-brand h1{
  margin:0;
  font-family:'Bree Serif', serif;
  font-size:2.2rem;
  color:var(--brown-dark);
}

.logo-icon{
  font-size:1.6rem;
  color:var(--accent);
}

/* ===== Shared Account Bar ===== */

#account-area{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  min-height:56px;
  background:var(--brown);
  color:#fff;
  border-radius:12px;
  padding:12px 18px;
  margin-bottom:24px;
  box-shadow:0 4px 10px rgba(0,0,0,0.14);
}

#server-time-widget{
  font-weight:700;
  letter-spacing:0.4px;
  white-space:nowrap;
}

#account-controls{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:nowrap;
  justify-content:flex-end;
}

#usernameDisplay{
  font-weight:700;
}

#account-controls a{
  text-decoration:none;
  color:#fff;
  font-weight:700;
  padding:0 10px;
  border-radius:8px;
  transition:background 0.2s ease, transform 0.2s ease;
}

#account-controls a:hover{
  background:rgba(255,255,255,0.14);
  transform:translateY(-1px);
}

#settingsLink,
#logoutButton{
  border:none;
  background:var(--accent);
  color:#fff;
  padding:8px 14px;
  border-radius:8px;
  font-weight:700;
  font-size:1rem;
  cursor:pointer;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height:1;
  transition:background 0.2s ease, transform 0.2s ease;
}

#settingsLink:hover,
#logoutButton:hover{
  background:var(--brown-light);
  transform:translateY(-1px);
}

.close-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:30px;
  height:30px;
  border:none;
  border-radius:999px;
  padding:0;
  background:var(--brown);
  color:#fff;
  font-size:1.35rem;
  font-family:inherit;
  font-weight:800;
  line-height:1;
  cursor:pointer;
  transition:background 0.2s ease, transform 0.2s ease;
}

.close-button:hover{
  background:var(--brown-dark);
  transform:translateY(-1px);
}

@media (max-width: 700px){
  .site-shell{
    padding:14px;
  }

  .hero-header.panel{
    margin-bottom:0;
    border-bottom-left-radius:0;
    border-bottom-right-radius:0;
  }

  .hero-header .hero-banner-image{
    height:120px;
  }

  .hero-brand{
    padding:10px 18px;
  }

  .hero-brand h1{
    font-size:1.8rem;
  }

  #account-area{
    flex-direction:row;
    align-items:center;
    border-top-left-radius:0;
    border-top-right-radius:0;
    padding:10px 14px;
    min-height:52px;
  }

  #account-controls{
    width:auto;
    flex-wrap:nowrap;
    justify-content:flex-end;
  }

  #settingsLink,
  #logoutButton{
    font-size:0.88rem;
    padding:7px 12px;
  }

  #usernameDisplay{
    display:none;
  }
}
