@import url("fonts.css");

:root{
  --accent:#9a6f50;
  --accent-dark:#74513a;
  --accent-soft:#eadccf;
  --bg:#f6f1eb;
  --bg-2:#eee5dc;
  --card:#fffdf9;
  --text:#3e3530;
  --muted:#786c64;
  --border:#e5dad0;
  --border-strong:#d6c7ba;
  --danger:#9a4841;
  --app-bg:#f6f1eb;
  --heading-font:Georgia,"Times New Roman",serif;
  --body-font:"Montserrat",system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  --content-align:center;
  --radius:20px;
  --radius-sm:13px;
  --shadow:0 14px 36px rgba(74,55,43,.08);
  --shadow-soft:0 6px 18px rgba(74,55,43,.06);
}

*{box-sizing:border-box}
html{min-height:100%;background:var(--app-bg,var(--bg))}
body{
  margin:0;
  min-height:100%;
  background:
    radial-gradient(900px 420px at 12% -10%,rgba(201,167,139,.13),transparent 70%),
    radial-gradient(780px 420px at 104% 10%,rgba(154,111,80,.08),transparent 72%),
    linear-gradient(180deg,var(--app-bg,var(--bg)) 0%,#faf7f3 55%,var(--app-bg,var(--bg)) 100%);
  color:var(--text);
  font-family:var(--body-font,"Montserrat",system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif);
  font-size:14px;
  font-weight:400;
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

a{color:var(--accent-dark);text-underline-offset:3px}
a:hover{color:var(--accent)}
a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid rgba(95,132,156,.45);outline-offset:3px}

main{
  width:min(100%,720px);
  min-height:72vh;
  margin:0 auto;
  padding:26px 18px 0;
}
.owner main{width:min(100%,940px)}

.hero{
  width:100%;
  margin:12px auto 30px;
  text-align:var(--content-align,center);
}
.owner .hero{max-width:680px}
.hero-photo{
  margin:0 auto 22px;
  overflow:hidden;
  border:1px solid var(--border);
  border-radius:28px;
  background:#f1e8df;
  box-shadow:var(--shadow);
}
.hero .hero-img{
  display:block;
  width:100%;
  height:auto;
  max-height:72vh;
  object-fit:cover;
}
.hero h1{
  margin:18px 0 10px;
  font-family:var(--heading-font,Georgia,"Times New Roman",serif);
  font-size:clamp(38px,8vw,64px);
  font-weight:400;
  line-height:1.08;
  letter-spacing:-.7px;
  color:#342c27;
}
.hero .sub{
  max-width:560px;
  margin:0 auto;
  color:#665b54;
  font-size:15px;
  font-weight:400;
  line-height:1.7;
}
.chip-date{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 12px;
  border:1px solid var(--border);
  border-radius:999px;
  background:rgba(255,255,255,.78);
  color:#75685f;
  box-shadow:0 3px 12px rgba(66,49,39,.04);
  font-size:11px;
  font-weight:400;
  letter-spacing:.45px;
}
.chip-date svg{flex:0 0 auto}

.tabs{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:8px;
  margin:0 0 22px;
  padding:0;
  border:0;
}
.tabs:empty{display:none}
.tabs button{
  min-height:40px;
  padding:9px 14px;
  border:1px solid var(--border);
  border-radius:999px;
  background:rgba(255,255,255,.76);
  color:#5d524b;
  box-shadow:none;
  font-size:12px;
  font-weight:400;
}
.tabs button:hover{border-color:var(--border-strong);background:#fff;color:#4f443d}
.tabs button.active{
  border-color:var(--accent);
  background:var(--accent);
  color:#fff;
}
.tabs button.active:hover,.tabs button.active:focus-visible{
  border-color:var(--accent);
  background:var(--accent);
  color:#fff;
  filter:brightness(.9);
}

.card{
  margin:0 0 20px;
  padding:24px;
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--card,#fffdf9);
  box-shadow:var(--shadow-soft);
}
.card h2,.card h3{
  margin-top:0;
  color:#3a312c;
  font-family:var(--heading-font,Georgia,"Times New Roman",serif);
  font-weight:400;
  text-align:var(--content-align,center);
  line-height:1.25;
}
.card h2{margin-bottom:14px;font-size:25px}
.card h3{margin-bottom:12px;font-size:20px}
.card>p:first-of-type{margin-top:0}
.card p:last-child{margin-bottom:0}

.grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.grid .wide{grid-column:1/-1}
.field{display:grid;gap:7px}
.uploader{display:grid;gap:15px;margin:0}
.uploader label{margin:0}

label{
  display:block;
  margin:13px 0 6px;
  color:#5b5049;
  font-size:12.5px;
  font-weight:600;
  letter-spacing:.05px;
}
input,textarea,select{
  display:block;
  width:100%;
  padding:12px 14px;
  border:1px solid var(--border-strong);
  border-radius:var(--radius-sm);
  background:#fff;
  color:var(--text);
  font-family:var(--body-font,"Montserrat",system-ui,sans-serif);
  font-size:14px;
  font-weight:400;
  line-height:1.5;
  transition:border-color .18s ease,box-shadow .18s ease,background .18s ease;
}
textarea{min-height:108px;resize:vertical}
input:focus,textarea:focus,select:focus{
  border-color:var(--accent);
  box-shadow:0 0 0 4px rgba(154,111,80,.09);
}
input[type=checkbox],input[type=radio]{display:inline-block;width:auto;margin-right:7px;accent-color:var(--accent)}
input[type=color]{height:46px;padding:5px}
input[type=file]{padding:14px;background:#fbf7f2;border-style:dashed}

.drop{
  position:relative;
  display:block;
  padding:22px 18px;
  border:1px dashed #cdbdaf;
  border-radius:17px;
  background:#fbf7f2;
  text-align:center;
  cursor:pointer;
  transition:border-color .18s ease,background .18s ease,transform .18s ease;
}
.drop:hover{border-color:var(--accent);background:#fffdf9}
.drop strong{
  display:block;
  margin-bottom:5px;
  color:#4b4039;
  font-size:14px;
  font-weight:600;
}
.drop input[type=file]{position:absolute;inset:0;width:100%;height:100%;padding:0;opacity:0;cursor:pointer}
.drop:focus-within{outline:3px solid rgba(95,132,156,.35);outline-offset:3px}
.hint,.help,.meta{color:var(--muted);font-size:12px;font-weight:400;line-height:1.6}

button,.button,.btn{
  appearance:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:11px 17px;
  border:1px solid var(--accent);
  border-radius:12px;
  background:var(--accent);
  color:#fff;
  cursor:pointer;
  font-family:var(--body-font,"Montserrat",system-ui,sans-serif);
  font-size:13px;
  font-weight:600;
  line-height:1.35;
  letter-spacing:.05px;
  text-align:center;
  text-decoration:none;
  box-shadow:0 5px 14px rgba(128,88,60,.12);
  transition:transform .12s ease,box-shadow .18s ease,filter .18s ease,background .18s ease;
}
button:hover,.button:hover,.btn:hover{filter:brightness(1.03);box-shadow:0 7px 18px rgba(128,88,60,.16);color:#fff}
button:active,.button:active,.btn:active{transform:translateY(1px)}
button:disabled,.button:disabled,.btn:disabled{opacity:.5;cursor:not-allowed;box-shadow:none}
.secondary,.btn.ghost{
  border-color:var(--border-strong);
  background:#fff;
  color:#584c45;
  box-shadow:none;
}
.secondary:hover,.secondary:focus-visible,.secondary:active,.btn.ghost:hover,.btn.ghost:focus-visible,.btn.ghost:active{background:#f8f2eb;color:#403630}
.danger{border-color:var(--danger);background:var(--danger)}
.actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:18px}
.btn-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:9px;margin-top:3px}
.btn-row .btn{width:100%}

.privacy{
  display:flex;
  align-items:flex-start;
  gap:9px;
  margin:2px 0!important;
  color:#6d6159;
  font-size:11px;
  font-weight:400;
  line-height:1.55;
}
.privacy input{flex:0 0 auto;width:17px;height:17px;margin:1px 0 0}
.privacy-link{color:var(--accent-dark)}

.gallery{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.gallery .card{margin:0}
.entry img{display:block;width:100%;max-height:520px;object-fit:contain;border-radius:14px;background:#f5eee7}
.entry p{white-space:pre-line;overflow-wrap:anywhere}
.entry audio{width:100%}
.entry .actions button{min-height:38px;padding:8px 11px;font-size:11px}
.asset{display:block;max-width:100%;max-height:850px;margin:auto;border-radius:14px}
.empty{margin:0;padding:42px 20px;border:1px dashed var(--border-strong);border-radius:18px;background:rgba(255,255,255,.45);color:var(--muted);text-align:center}

.quiz-question{margin:0;padding:15px 0;border:0;border-bottom:1px solid var(--border)}
.quiz-question:last-of-type{border-bottom:0}
.quiz-question legend{margin-bottom:8px;font-family:var(--heading-font,Georgia,"Times New Roman",serif);font-size:17px;font-weight:400}
.quiz-question label{font-size:13px;font-weight:400}
.quiz-edit{margin-top:16px;padding-top:16px;border-top:1px solid var(--border)}

.linkbox{
  padding:13px 14px;
  border:1px solid var(--border);
  border-radius:12px;
  background:#f8f3ed;
  overflow-wrap:anywhere;
  font-size:12px;
}
.linkbox a{color:var(--accent-dark)}
.instruction-qr{
  display:block;
  width:min(240px,80%);
  height:auto;
  margin:22px auto;
  padding:12px;
  border:1px solid var(--border);
  border-radius:16px;
  background:#fff;
  box-shadow:var(--shadow-soft);
}
#record-status{color:var(--accent-dark);font-size:12px}

#notice{
  position:fixed;
  left:50%;
  bottom:24px;
  z-index:110;
  max-width:min(90vw,520px);
  padding:12px 18px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:12px;
  background:#403630;
  color:#fff;
  box-shadow:0 12px 34px rgba(0,0,0,.18);
  transform:translateX(-50%);
  font-size:12px;
  text-align:center;
}
#notice:empty{display:none}

footer.footer{
  width:min(100%,720px);
  margin:32px auto 0;
  padding:0 18px 64px;
  color:#776a62;
  text-align:center;
  font-size:12px;
}
.footer-inner{
  display:grid;
  gap:11px;
  padding-top:26px;
  border-top:1px solid rgba(213,198,185,.7);
}
.footer-brand{display:flex;align-items:center;justify-content:center;gap:8px;color:#534842}
.footer-brand-mark{width:20px;height:20px;opacity:.76}
.footer-contact{font-size:11px}
.logo{display:flex;justify-content:center;margin:4px auto;max-width:100%}
.logo__img{display:block;width:100%;max-width:190px;height:auto;opacity:.9}
.socials{display:flex;align-items:center;justify-content:center;gap:10px}
.socials a{display:inline-flex;padding:8px;border:1px solid var(--border);border-radius:999px;background:rgba(255,255,255,.7);color:#655950}

.desktop-note{
  position:fixed;
  inset:0;
  z-index:50;
  display:none;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:rgba(244,238,231,.88);
  backdrop-filter:blur(7px);
  text-align:center;
}
.desktop-note .panel{
  max-width:500px;
  padding:28px;
  border:1px solid var(--border);
  border-radius:22px;
  background:#fffdf9;
  box-shadow:var(--shadow);
}
.desktop-note h2{margin:0 0 8px;font-family:Georgia,"Times New Roman",serif;font-size:24px;font-weight:400}
.desktop-note p{margin:0;color:var(--muted)}

.privacy-backdrop{
  position:fixed;
  inset:0;
  z-index:100;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:rgba(238,230,221,.9);
  backdrop-filter:blur(7px);
}
.privacy-backdrop[hidden]{display:none}
.privacy-modal{
  width:min(92vw,540px);
  max-height:90dvh;
  overflow:auto;
  padding:26px;
  border:1px solid var(--border);
  border-radius:22px;
  background:#fffdf9;
  box-shadow:var(--shadow);
}
.privacy-modal h2{margin:0 0 9px;font-family:Georgia,"Times New Roman",serif;font-size:25px;font-weight:400}
.privacy-modal p{color:var(--muted)}
.privacy-check{display:flex;align-items:flex-start;gap:10px;margin:14px 0 16px}
.privacy-check input{flex:0 0 auto;width:18px;height:18px;margin-top:2px;accent-color:var(--accent)}
.privacy-hint{text-align:center;font-size:11px;color:var(--muted)}

@media(max-width:640px){
  main{padding:20px 14px 0}
  .hero{margin-top:8px;margin-bottom:24px}
  .hero-photo{border-radius:21px}
  .hero .hero-img{max-height:none}
  .hero h1{font-size:clamp(36px,12vw,52px)}
  .card{padding:19px;border-radius:18px}
  .card h2{font-size:22px}
  .grid,.gallery{grid-template-columns:1fr}
  .actions{display:grid;grid-template-columns:1fr}
  .actions>*{width:100%}
  footer.footer{padding:0 14px 54px}
}

@media(min-width:820px){
  .desktop-note{display:flex}
  body:not(.owner) main{filter:blur(2px) grayscale(.08);pointer-events:none;user-select:none}
  body.owner .desktop-note{display:none}
  body.owner main{filter:none;pointer-events:auto;user-select:auto}
}

@media(prefers-reduced-motion:reduce){*{transition:none!important}}
@media print{
  .desktop-note,.privacy-backdrop,.tabs,footer.footer,button,.actions{display:none!important}
  body,main{background:#fff!important;filter:none!important}
  main{width:100%;padding:0}
  .card{break-inside:avoid;box-shadow:none}
}
