:root{
  --bg:#ffffff;
  --ink:#6c6c6c;
  --muted:#8a8a8a;
  --card:#ffffff;
  --line:#e9eef2;
  --blue:#bfe8ff;
  --green:#c9f2d6;
  --blue2:#dff0ff;
  --green2:#dff6e8;
  --accent:#8dc8b0;
  --accent2:#7dbbe0;
  --shadow:0 10px 30px rgba(0,0,0,0.06);
  --radius:18px;
  --focus: 0 0 0 3px rgba(125,187,224,0.35);
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  --script: "Dancing Script", "Segoe Script", "Bradley Hand", "Comic Sans MS", cursive;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.45;
}

a{ color: inherit; text-decoration: none; }
a:hover{ text-decoration: underline; }

.site-bg{
  min-height:100%;
  background:
    url("assets/img/decor.svg") no-repeat left top / 460px 460px,
    url("assets/img/decor.svg") no-repeat right bottom / 520px 520px,
    linear-gradient(180deg, rgba(223,246,232,0.28), rgba(223,240,255,0.16) 45%, rgba(255,255,255,1) 100%);
}

.container{
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 18px 40px;
}

.header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 16px;
  padding: 10px 4px 16px;
}

.brand{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.brand h1{
  margin:0;
  font-family: var(--script);
  font-weight: 700;
  font-size: 44px;
  letter-spacing: 0.3px;
  color: #5f6d66;
  text-shadow: 0 1px 0 rgba(255,255,255,0.8);
}
.brand .tagline{
  margin:0;
  font-size: 14px;
  color: var(--muted);
}

.toplinks{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  justify-content:flex-end;
  align-items:center;
}
.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.65);
  box-shadow: 0 6px 14px rgba(0,0,0,0.05);
}
.pill .dot{
  width:10px;height:10px;border-radius:50%;
  background: linear-gradient(135deg, var(--green), var(--blue));
  border: 1px solid rgba(0,0,0,0.05);
}

.layout{
  display:grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.menu-card{
  background: rgba(255,255,255,0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px;
  overflow:auto;
}

.menu-title{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap: 12px;
  margin: 0 0 10px;
}
.menu-title h2{
  margin:0;
  font-size: 16px;
  letter-spacing: 0.2px;
}
.menu-title .hint{
  font-size: 12px;
  color: var(--muted);
}

.grid{
  display:grid;
  grid-auto-rows: minmax(34px, auto);
  gap: 6px;
  min-width: 760px;
}
.grid .cell{
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,0.85);
  padding: 8px 10px;
  display:flex;
  align-items:center;
  justify-content:center;
  white-space:nowrap;
}
.grid .cell.head{
  font-weight: 600;
  color:#5f5f5f;
  background: linear-gradient(135deg, rgba(201,242,214,0.55), rgba(191,232,255,0.45));
}
.grid .cell.year{
  justify-content:flex-start;
  font-family: var(--mono);
  font-size: 12px;
  background: rgba(223,246,232,0.24);
}
.grid .cell a{
  display:inline-flex;
  width:100%;
  height:100%;
  align-items:center;
  justify-content:center;
  padding: 6px 6px;
  border-radius: 11px;
}
.grid .cell.link a{
  background: linear-gradient(135deg, rgba(201,242,214,0.45), rgba(191,232,255,0.35));
  border: 1px solid rgba(0,0,0,0.03);
}
.grid .cell.link a:hover{
  text-decoration:none;
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}
.grid .cell.empty{
  background: transparent;
  border: none;
}

.content-card{
  background: rgba(255,255,255,0.86);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 16px 12px;
}

.breadcrumb{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  color: var(--muted);
  font-size: 12px;
  margin:0 0 10px;
}
.breadcrumb .crumb{
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(223,240,255,0.25);
}

.page-title{
  margin: 2px 0 12px;
  font-size: 22px;
  letter-spacing: 0.2px;
  color:#5f5f5f;
}

.notice{
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px dashed rgba(125,187,224,0.65);
  background: rgba(223,240,255,0.22);
  margin: 10px 0 16px;
}

.gallery{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  padding: 4px 0 16px;
}
.art{
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.9);
  overflow:hidden;
}
.art-inner{
  padding: 14px 14px 12px;
}
.art-title{
  margin:0 0 8px;
  font-size: 16px;
  letter-spacing: 0.2px;
  color:#5f5f5f;
}
.art-text{
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 14px;
  white-space: pre-wrap;
}
.art img{
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.05);
}

.admin-panel{
  margin-top: 10px;
  display:flex;
  flex-direction:column;
  gap: 10px;
}
.admin-panel label{
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}
textarea{
  width: 100%;
  min-height: 74px;
  padding: 10px 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  font-family: var(--sans);
  color: var(--ink);
  background: rgba(255,255,255,0.95);
  outline:none;
}
textarea:focus{ box-shadow: var(--focus); border-color: rgba(125,187,224,0.65); }
.btnrow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  flex-wrap:wrap;
}
button{
  border: 1px solid rgba(0,0,0,0.06);
  background: linear-gradient(135deg, rgba(201,242,214,0.65), rgba(191,232,255,0.55));
  color:#4f5b57;
  padding: 9px 12px;
  border-radius: 14px;
  cursor:pointer;
  box-shadow: 0 10px 20px rgba(0,0,0,0.06);
}
button:hover{ transform: translateY(-1px); }
button:active{ transform: translateY(0px); }

.status{
  font-size: 12px;
  color: var(--muted);
}

.footer{
  margin-top: 18px;
  padding: 16px 4px 6px;
  color: var(--muted);
  font-size: 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  flex-wrap:wrap;
}
.small{
  font-size: 12px;
  color: var(--muted);
}

.login-card{
  max-width: 520px;
  margin: 0 auto;
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.9);
  box-shadow: var(--shadow);
}
.login-card h2{
  margin: 0 0 10px;
  color:#5f5f5f;
}
.login-card form{
  display:flex;
  flex-direction:column;
  gap: 10px;
}
input[type="text"], input[type="password"]{
  width:100%;
  padding: 10px 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.95);
  color: var(--ink);
  outline:none;
}
input[type="text"]:focus, input[type="password"]:focus{ box-shadow: var(--focus); border-color: rgba(125,187,224,0.65); }

hr.soft{
  border:none;
  border-top: 1px solid var(--line);
  margin: 12px 0;
}


/* Year bar menu (compact) */
.yearbar-card{
  background: rgba(255,255,255,0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 12px 10px;
  overflow:auto;
}
.yearbar{
  display:flex;
  gap: 10px;
  align-items:stretch;
  min-width: 760px;
}
.yearpill{
  flex: 0 0 auto;
  width: 110px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.85);
  padding: 10px 10px 8px;
  text-align:center;
}
.yearpill a{
  display:block;
  border-radius: 14px;
  padding: 8px 8px;
  background: linear-gradient(135deg, rgba(201,242,214,0.45), rgba(191,232,255,0.35));
  border: 1px solid rgba(0,0,0,0.03);
  font-weight: 700;
  font-family: var(--mono);
  letter-spacing: 0.2px;
}
.yearpill a:hover{ text-decoration:none; box-shadow: 0 8px 18px rgba(0,0,0,0.06); transform: translateY(-1px); }
.yearcount{
  margin-top: 7px;
  font-size: 12px;
  color: var(--muted);
}

/* Thumbnail gallery: 3 across */
.gallery{
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 980px){
  .gallery{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px){
  .gallery{ grid-template-columns: 1fr; }
}
.art img{
  max-height: 240px;
  object-fit: contain;
  background: rgba(223,240,255,0.15);
}

/* Featured image on home */
.featured{
  display:flex;
  flex-direction:column;
  gap: 10px;
}
.featured img{
  width:100%;
  height:auto;
  border-radius: 18px;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 12px 28px rgba(0,0,0,0.06);
  cursor: zoom-in;
}

/* Full-screen modal */
.modal{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  padding: 18px;
  background: rgba(0,0,0,0.78);
  z-index: 9999;
}
.modal.open{ display:flex; }
.modal-inner{
  max-width: min(1200px, 96vw);
  max-height: 92vh;
  width: 100%;
}
.modal-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin-bottom: 10px;
  color: rgba(255,255,255,0.92);
}
.modal-title{
  font-size: 14px;
  letter-spacing: 0.2px;
  overflow:hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.modal-close{
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.95);
  padding: 8px 10px;
  border-radius: 14px;
  cursor:pointer;
}
.modal-close:hover{ background: rgba(255,255,255,0.12); }
.modal-img{
  width:100%;
  height:auto;
  max-height: 86vh;
  object-fit: contain;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(0,0,0,0.2);
}

/* Year bar overrides: fit 2020–2030 without horizontal scrolling */
.yearbar{ min-width: 0 !important; }
.yearbar-compact{
  display:grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  gap: 6px;
}
.yearpill{ width: auto !important; }
.yearpill-compact{
  padding: 6px 6px 5px;
  border-radius: 14px;
}
.yearpill-compact a{
  padding: 6px 5px;
  border-radius: 11px;
  font-size: 12px;
}
.yearpill-compact .yearcount{
  margin-top: 5px;
  font-size: 10.5px;
}
@media (max-width: 900px){
  .yearbar-compact{ grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); }
}
