@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;700&family=Plus+Jakarta+Sans:wght@400;600;700;800&display=swap');

:root {
  --bg: #f7f3ea;
  --bg-deep: #e8f1ea;
  --ink: #1c2433;
  --muted: #586074;
  --card: #fffdf8;
  --line: #d8d1c2;
  --primary: #0f6d5e;
  --primary-ink: #f6fffb;
  --secondary: #f0ece2;
  --danger: #b42318;
  --danger-bg: #ffe7e4;
  --shadow-soft: 0 10px 26px rgba(45, 54, 74, 0.12);
  --shadow-strong: 0 18px 42px rgba(22, 31, 46, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
  background:
    radial-gradient(1200px 480px at -10% -20%, #fff2c9 0%, transparent 55%),
    radial-gradient(1000px 420px at 110% 0%, #d6f0e7 0%, transparent 55%),
    linear-gradient(180deg, #f1efe8 0%, var(--bg) 38%, #eef4f0 100%);
  min-height: 100vh;
}

h1,
h2,
h3,
.menu-btn,
.btn,
.back-link,
.eyebrow {
  font-family: 'Space Grotesk', 'Plus Jakarta Sans', sans-serif;
}

.home-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
}

.hero-card {
  width: min(760px, 100%);
  background: linear-gradient(170deg, #fffdf8 0%, #fffaf1 100%);
  border: 1px solid #e4dece;
  border-radius: 30px;
  padding: clamp(18px, 3.6vw, 34px);
  box-shadow: var(--shadow-strong);
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: '';
  position: absolute;
  right: -80px;
  top: -80px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, #d9f4ea 0%, #d9f4ea 20%, transparent 70%);
  pointer-events: none;
}

.hero-card::after {
  content: '';
  position: absolute;
  left: -70px;
  bottom: -70px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff0cf 0%, #fff0cf 20%, transparent 72%);
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 8px;
  color: #0f6d5e;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hero-card h1 {
  margin: 0;
  font-size: clamp(1.75rem, 6vw, 2.65rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 16ch;
}

.lead {
  margin: 14px 0 20px;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 50ch;
}

.home-actions {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  position: relative;
  z-index: 1;
}

.menu-btn {
  display: block;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fcfaf4;
  color: var(--ink);
  padding: 15px 16px;
  font-size: 1.06rem;
  font-weight: 700;
  text-align: center;
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}

.menu-btn:hover {
  transform: translateY(-1px);
  border-color: #c6bcaa;
  box-shadow: 0 10px 18px rgba(64, 58, 43, 0.12);
}

.menu-btn.primary {
  background: linear-gradient(135deg, #0f6d5e 0%, #168c79 100%);
  color: var(--primary-ink);
  border-color: #0e6153;
  box-shadow: 0 10px 20px rgba(15, 109, 94, 0.28);
}

#draftNotice {
  margin-top: 14px;
  border-radius: 16px;
  border: 1px solid #cce7dd;
  background: linear-gradient(165deg, #f3fff9 0%, #e9f8f2 100%);
  position: relative;
  z-index: 1;
}

.home-links {
  margin-top: 14px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.home-links a {
  color: #5f6457;
  text-decoration: none;
  font-weight: 600;
  font-size: .9rem;
}

.app-top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  background: rgba(247, 243, 234, .82);
  border-bottom: 1px solid #e4dece;
  backdrop-filter: blur(10px);
}

.app-top h1 {
  margin: 0;
  font-size: 1.18rem;
}

.back-link {
  text-decoration: none;
  color: #0f6d5e;
  font-weight: 700;
}

.page-wrap {
  width: min(970px, 100%);
  margin: 0 auto;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.panel {
  background: var(--card);
  border: 1px solid #e8e1d3;
  border-radius: 18px;
  padding: 14px;
  box-shadow: var(--shadow-soft);
}

.panel h2 {
  margin: 0 0 10px;
  font-size: 1.02rem;
}

.row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.wrap {
  flex-wrap: wrap;
}

input,
select,
.btn,
.link-btn,
button {
  font: inherit;
  border-radius: 13px;
  border: 1px solid var(--line);
  padding: 10px 12px;
  min-height: 44px;
}

input,
select {
  background: #ffffff;
  color: var(--ink);
}

input:focus,
select:focus {
  outline: none;
  border-color: #79b6a8;
  box-shadow: 0 0 0 3px rgba(15, 109, 94, 0.13);
}

.btn,
button {
  background: var(--secondary);
  color: var(--ink);
  cursor: pointer;
  transition: transform .13s ease, box-shadow .2s ease;
}

.btn:hover,
button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 14px rgba(62, 56, 42, 0.12);
}

.btn.primary {
  background: linear-gradient(135deg, #0f6d5e 0%, #168c79 100%);
  color: var(--primary-ink);
  border-color: #0d5f51;
}

.btn.danger,
button.danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: #ffcfc8;
}

button:disabled {
  opacity: .58;
}

.link-btn {
  text-decoration: none;
  background: #f4f1e9;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
}

.hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: .93rem;
}

.scanner-box {
  width: 100%;
  min-height: 235px;
  border: 1px dashed #9cc8b8;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(180deg, #fbfffd 0%, #f4f8f3 100%);
  margin: 10px 0;
}

.scanner-video,
#scanner video,
#scanner canvas {
  width: 100% !important;
  min-height: 235px !important;
  object-fit: cover !important;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

th,
td {
  border-bottom: 1px solid #ebe4d7;
  padding: 8px 6px;
  text-align: left;
  font-size: .92rem;
}

th {
  color: #5f6b58;
  font-weight: 700;
}

.total-line {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  font-size: 1.08rem;
}

.mini-list,
.check-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.mini-list li,
.check-list li {
  border: 1px solid #e6dfd2;
  border-radius: 12px;
  padding: 10px;
  background: #fffdf8;
}

.check-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 8px;
  align-items: center;
}

.done {
  text-decoration: line-through;
  color: #7d8478;
}

.session-list {
  display: grid;
  gap: 10px;
}

.session-card {
  background: var(--card);
  border: 1px solid #e8e1d3;
  border-radius: 14px;
  padding: 12px;
}

.session-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.session-meta {
  color: var(--muted);
  font-size: .9rem;
}

.session-items {
  margin: 8px 0 0;
  padding-left: 18px;
}

@media (max-width: 760px) {
  .page-wrap { padding: 10px; }
  th:nth-child(3), td:nth-child(3) { display: none; }
  .check-row { grid-template-columns: auto 1fr auto; }
  .hero-card { border-radius: 24px; }
}
