:root {
  --bg: #faf8f5;
  --ink: #22201d;
  --muted: #7a746b;
  --card: #ffffff;
  --accent: #c2542e;
  --accent-dark: #a04424;
  --line: #e8e2d9;
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

header.site {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0;
}
.logo { font-size: 1.3rem; font-weight: 700; text-decoration: none; color: var(--ink); }
.logo span { color: var(--accent); }

.btn {
  display: inline-block; border: 0; cursor: pointer;
  background: var(--accent); color: #fff;
  padding: 12px 24px; border-radius: 999px;
  font-size: 1rem; font-weight: 600; text-decoration: none;
  transition: background .15s;
}
.btn:hover { background: var(--accent-dark); }
.btn.ghost {
  background: transparent; color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn.ghost:hover { background: #f1ece5; }
.btn.small { padding: 8px 16px; font-size: .9rem; }
.btn.danger { background: #b3372f; }
.btn:disabled { opacity: .5; cursor: default; }

.hero { text-align: center; padding: 64px 0 48px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.15; margin-bottom: 18px; }
.hero p.sub { font-size: 1.15rem; color: var(--muted); max-width: 620px; margin: 0 auto 30px; }

.features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px; padding: 30px 0 60px;
}
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px;
}
.card .emoji { font-size: 1.8rem; }
.card h3 { margin: 10px 0 6px; font-size: 1.05rem; }
.card p { color: var(--muted); font-size: .93rem; }

.panel {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px; margin: 24px 0;
}
.panel h2 { margin-bottom: 14px; }

label { display: block; font-weight: 600; font-size: .9rem; margin: 14px 0 5px; }
input[type=text], input[type=date], select, textarea {
  width: 100%; padding: 11px 13px; font-size: 1rem;
  border: 1.5px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--ink); font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }

.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px; margin-top: 18px;
}
.tile {
  position: relative; border-radius: 10px; overflow: hidden;
  background: #eee; aspect-ratio: 1; border: 1px solid var(--line);
}
.tile img, .tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .meta {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.65));
  color: #fff; font-size: .75rem; padding: 18px 8px 6px;
}
.tile .del {
  position: absolute; top: 6px; right: 6px;
  background: rgba(0,0,0,.55); color: #fff; border: 0;
  border-radius: 6px; padding: 3px 8px; cursor: pointer; font-size: .8rem;
}

.audio-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.audio-item {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 14px;
}
.audio-item .who { font-weight: 600; min-width: 100px; }

.notice { color: var(--muted); font-size: .9rem; }
.ok { color: #2e7d32; font-weight: 600; }
.err { color: #b3372f; font-weight: 600; }

.share-row { display: flex; gap: 24px; flex-wrap: wrap; align-items: center; }
.share-row img { border: 1px solid var(--line); border-radius: 10px; }
code.link {
  display: inline-block; background: #f1ece5; padding: 8px 12px;
  border-radius: 8px; font-size: .9rem; word-break: break-all;
}

.tabs { display: flex; gap: 8px; margin: 20px 0 4px; }
.tabs button {
  border: 1.5px solid var(--line); background: #fff; color: var(--ink);
  padding: 8px 18px; border-radius: 999px; cursor: pointer; font-size: .95rem;
}
.tabs button.active { background: var(--ink); color: #fff; border-color: var(--ink); }

footer.site { padding: 40px 0; color: var(--muted); font-size: .85rem; text-align: center; }

.progress { height: 10px; background: #eee9e1; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; margin-top: 14px; }
.progress .bar { height: 100%; background: var(--accent); width: 0%; transition: width .2s; }
.file-list { list-style: none; margin-top: 10px; font-size: .88rem; color: var(--muted); }
.file-list li { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }
.file-list .state { white-space: nowrap; }
.check { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: .92rem; }
.check input { width: auto; }

.rec-dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  background: #b3372f; margin-right: 6px; animation: blink 1s infinite;
}
@keyframes blink { 50% { opacity: .2; } }

/* slideshow */
body.slideshow { background: #000; overflow: hidden; }
#stage { position: fixed; inset: 0; }
#stage .slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s;
  display: flex; align-items: center; justify-content: center;
}
#stage .slide.show { opacity: 1; }
#stage img, #stage video { max-width: 100%; max-height: 100%; }
#stage .credit {
  position: absolute; bottom: 30px; left: 0; right: 0; text-align: center;
  color: #fff; font-size: 1.3rem; text-shadow: 0 2px 8px rgba(0,0,0,.8);
}
#qr-corner {
  position: fixed; right: 24px; bottom: 24px; z-index: 5;
  background: #fff; padding: 10px; border-radius: 12px; text-align: center;
  font-size: .8rem; color: #222;
}
#qr-corner img { display: block; width: 110px; height: 110px; }
