@font-face { font-family: "HamLogo"; src: url(fonts/logo.woff?v=f19902247d) format("woff"); font-display: swap; }
:root {
  --ink: #22130a; --brown: #3a2412; --brown2: #6b4420; --parch: #fdf4dc; --parch2: #eedcb4; --card: #fff9ea; --line: #a97c3f;
  --gold1: #fff2a1; --gold2: #ffc62e; --gold3: #e88a12; --green1: #a8e65a; --green2: #63c32f; --green3: #2f8f22; --green4: #1f6b25; --red1: #ff6b57; --red2: #c21a1a;
  --blue1: #4aa3f0; --blue2: #1a5cb4; --slate1: #2f4768; --slate2: #16263b; --wood1: #a66c33; --wood2: #7d4d22; --wood3: #5a3517;
  --head: JamHead, "HamLogo", system-ui, sans-serif; --body: JamBody, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font: 700 16px/1.42 var(--body); color: var(--brown); background: linear-gradient(#7cc04b, #5fa83c 40%, #478a30); background-attachment: fixed; }
button, input, textarea, select { font: inherit; color: inherit; }
b { font-weight: 900; }
h1, h2, h3 { font-family: var(--head); font-weight: 400; margin: 0; }
img { display: block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.hero { position: relative; text-align: center; padding: 58px 16px 96px; overflow: hidden; background: linear-gradient(#1f8fe0, #6cc9f5 72%, #c8efff); }
.hero::after { content: ""; position: absolute; inset: auto -10% -68px; height: 130px; background: radial-gradient(60% 100% at 30% 100%, #5fb04a 98%, transparent), radial-gradient(60% 100% at 74% 100%, #4e9a35 98%, transparent); }
.sky { position: absolute; inset: 0; background: repeating-conic-gradient(from 0deg at 50% 46%, #fff2 0 7deg, #fff0 7deg 14deg); pointer-events: none; }
.logo { position: relative; z-index: 1; display: inline-block; font-family: "HamLogo", var(--head); font-size: clamp(36px, 10.6vw, 112px); line-height: 1.08; letter-spacing: .01em; white-space: nowrap; direction: ltr; }
.logo .stroke { display: block; color: var(--ink); -webkit-text-stroke: .18em var(--ink); text-shadow: 0 .06em 0 var(--ink); }
.logo .fill { position: absolute; inset: 0; background: linear-gradient(#fffbb0, #ffd72e 42%, #ffb31a 62%, #ee7a10); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kicker { position: relative; z-index: 1; margin: 10px 0 0; font: 400 clamp(19px, 3.4vw, 28px)/1.2 var(--head); color: #fff; text-shadow: 0 2px 0 var(--ink), 2px 0 0 var(--ink), -2px 0 0 var(--ink), 0 -2px 0 var(--ink); }
.ribbon { position: relative; z-index: 1; display: inline-block; max-width: 100%; margin: 12px 0 0; padding: 8px 20px; font: 400 clamp(15px, 3vw, 24px)/1.2 var(--head); color: #fff; text-shadow: 0 2px 0 var(--ink); background: linear-gradient(var(--red1), var(--red2)); border: 4px solid var(--ink); border-radius: 10px; }

.lang-box { position: absolute; top: 10px; inset-inline-end: 10px; z-index: 5; }
.lang-btn { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 10px; font-weight: 900; font-size: 15px; color: #fff; background: var(--slate1); border: 3px solid var(--ink); border-radius: 10px; cursor: pointer; }
.flag { width: 24px; height: 17px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px #0004; flex: none; }
.lang-menu { position: absolute; top: calc(100% + 6px); inset-inline-end: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; width: min(390px, calc(100vw - 20px)); max-height: 70vh; overflow: auto; padding: 8px; text-align: start; background: var(--card); border: 3px solid var(--ink); border-radius: 12px; box-shadow: 0 8px 0 #0003; }
.lang-menu[hidden] { display: none; }
.lang-menu button { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 8px; font-weight: 800; font-size: 15px; text-align: start; background: none; border: 0; border-radius: 8px; cursor: pointer; }
.lang-menu button:hover { background: #f1dcae; }
.lang-menu button[aria-checked="true"] { color: #fff; background: var(--green4); }

main { position: relative; max-width: 1060px; margin: 0 auto; padding: 18px 26px 26px; display: flex; flex-direction: column; gap: 36px; }
.notice { margin: 0; padding: 12px 16px; font-weight: 800; color: #fff; background: linear-gradient(var(--slate1), var(--slate2)); border: 4px solid var(--ink); border-radius: 12px; text-align: center; }
.panel { position: relative; padding: 48px 20px 22px; background: linear-gradient(var(--parch), var(--parch2)); border: 5px solid var(--ink); border-radius: 20px; box-shadow: 0 0 0 9px var(--wood2), 0 0 0 12px var(--ink), 0 14px 0 8px #10210a55; margin-top: 20px; }
.tab { position: absolute; top: -26px; inset-inline-start: 50%; transform: translateX(-50%); width: max-content; max-width: 92%; padding: 8px 24px; text-align: center; font-size: clamp(18px, 3.6vw, 27px); line-height: 1.15; color: #fff; text-shadow: 0 2px 0 var(--ink), 2px 0 0 var(--ink), -2px 0 0 var(--ink), 0 -2px 0 var(--ink); background: linear-gradient(var(--blue1), var(--blue2)); border: 4px solid var(--ink); border-radius: 10px; }
[dir="rtl"] .tab { transform: translateX(50%); }
.tab.red { background: linear-gradient(var(--red1), var(--red2)); }
.steps { margin: 0 0 14px; padding-inline-start: 24px; }
.steps li { margin-bottom: 4px; }
textarea { display: block; width: 100%; min-height: 110px; padding: 12px; background: #fff; border: 3px solid var(--line); border-radius: 12px; font: 700 14px/1.3 ui-monospace, Menlo, monospace; resize: vertical; }
textarea:focus-visible, input:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible, label:focus-within { outline: 3px solid var(--blue2); outline-offset: 2px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; margin-top: 16px; }
.row.small { margin-top: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 10px 26px; font: 400 clamp(18px, 3.4vw, 23px)/1.1 var(--head); color: #fff; text-shadow: 0 2px 0 var(--ink); border: 4px solid var(--ink); border-radius: 14px; cursor: pointer; transition: transform .08s; }
.btn.green { background: linear-gradient(var(--green1), var(--green2) 50%, var(--green3)); box-shadow: 0 5px 0 var(--green4); }
.btn.blue { background: linear-gradient(var(--blue1), var(--blue2)); box-shadow: 0 5px 0 #123a70; }
.btn.ghost { min-height: 46px; padding: 8px 18px; font-size: 17px; color: var(--brown); text-shadow: none; background: var(--card); border: 3px solid var(--line); }
.btn:active { transform: translateY(3px); box-shadow: none; }
.btn[disabled] { opacity: .6; cursor: default; }
.file input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.fine { margin: 14px 0 0; font-size: 14px; text-align: center; color: #5a3517; }
.err { margin: 10px 0 0; padding: 8px 12px; color: #fff; background: var(--red2); border-radius: 10px; }
.lead { margin: 8px 0 14px; text-align: center; }
.village { display: flex; gap: 12px; align-items: center; padding: 10px 14px; background: var(--card); border: 3px solid var(--line); border-radius: 14px; }
.village small { display: block; font-size: 14px; color: #5a3517; }
.village strong { font: 400 20px/1.2 var(--head); }

.group { margin-top: 16px; }
.group h3 { margin-bottom: 8px; font-size: 20px; color: #a81616; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 10px; }
.field { display: grid; grid-template-columns: 40px 1fr; align-items: center; gap: 2px 8px; padding: 8px 10px; background: var(--card); border: 3px solid var(--line); border-radius: 12px; }
.field img { width: 40px; height: 40px; object-fit: contain; grid-row: span 2; }
.field span { font-size: 14px; line-height: 1.15; overflow-wrap: anywhere; }
.field input { width: 100%; min-height: 42px; padding: 4px 8px; font-weight: 900; font-size: 18px; background: #fff; border: 2px solid var(--line); border-radius: 8px; }
.field.wide { grid-column: 1 / -1; grid-template-columns: 1fr; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { flex: 1 1 auto; min-height: 46px; padding: 6px 12px; font: 400 17px/1.15 var(--head); color: var(--brown); background: var(--card); border: 3px solid var(--line); border-radius: 10px; cursor: pointer; }
.seg button[aria-pressed="true"] { color: #fff; text-shadow: 0 2px 0 var(--ink); background: linear-gradient(var(--green2), var(--green4)); border-color: var(--ink); }
.tip { margin: 10px 0 4px; font-size: 14.5px; color: #5a3517; }

#s-result { display: flex; flex-direction: column; gap: 36px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.stat { padding: 14px 10px; text-align: center; color: #e6edf5; background: linear-gradient(var(--slate1), var(--slate2)); border: 4px solid var(--ink); border-radius: 16px; box-shadow: inset 0 0 0 3px #f2c14e; }
.stat h3 { font: 900 14px/1.2 var(--body); color: #ffd76a; letter-spacing: .03em; }
.stat strong { display: block; margin: 6px 0 4px; font: 400 clamp(26px, 5vw, 34px)/1.05 var(--head); color: #fff; }
.stat small { font-size: 14px; }

.ladder { display: flex; flex-direction: column; gap: 6px; }
.lad { display: grid; grid-template-columns: minmax(130px, 200px) 1fr 58px; gap: 8px; align-items: center; }
.lad > span:first-child { font: 400 17px/1.1 var(--head); }
.lad .track { position: relative; height: 38px; }
.lad .bar { position: absolute; inset-inline-start: 0; top: 2px; bottom: 2px; min-width: 96px; display: flex; align-items: center; justify-content: flex-end; padding: 0 10px; font: 400 16px var(--head); white-space: nowrap; background: linear-gradient(#ffe680, #ffc83a 55%, #ef9c1c); border: 3px solid var(--ink); border-radius: 9px; }
.lad.best .bar { background: linear-gradient(var(--green1), var(--green2) 50%, var(--green3)); }
.lad .gain { position: absolute; top: 9px; font: 400 15px var(--head); color: #a81616; white-space: nowrap; padding-inline-start: 6px; }
.lad .pc { font: 400 19px var(--head); color: var(--blue2); text-align: end; }
.lad-head { display: flex; justify-content: space-between; font-weight: 900; font-size: 14px; color: var(--brown2); margin-bottom: 2px; }

.compare { width: 100%; border-collapse: collapse; }
.compare th, .compare td { padding: 7px 6px; text-align: center; font: 400 17px var(--head); }
.compare th:first-child, .compare td:first-child { text-align: start; font: 900 15px var(--body); color: #5a3517; }
.compare tr + tr td { border-top: 1px solid #a97c3f66; }
.compare .hl { background: #ffd76a88; }
.verdict { display: flex; justify-content: center; margin-top: 12px; }
.verdict p { margin: 0; padding: 8px 22px; font: 400 23px var(--head); color: #fff; text-shadow: 0 2px 0 var(--ink); border: 4px solid var(--ink); border-radius: 14px; }
.verdict .yes { background: linear-gradient(var(--green2), var(--green4)); }
.verdict .meh { background: linear-gradient(#a7aeb6, #5d6670); }
.center { margin: 10px 0 0; text-align: center; }
.budget { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.bud { padding: 10px; text-align: center; background: var(--card); border: 3px solid var(--line); border-radius: 12px; }
.bud h3 { font-size: 17px; }
.bud p { margin: 4px 0 0; font-size: 14.5px; }
.bud b { font: 400 19px var(--head); color: var(--brown); }
.bud .sv b { color: #17632a; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 12px; }
.card { display: flex; flex-direction: column; padding: 12px; background: var(--card); border: 3px solid var(--line); border-radius: 14px; }
.card.wide { grid-column: 1 / -1; }
.card header { display: flex; gap: 10px; align-items: center; }
.card header .pic { position: relative; width: 58px; height: 58px; flex: none; }
.card header img.main { width: 58px; height: 58px; object-fit: contain; }
.card header img.badge { position: absolute; inset-inline-end: -4px; bottom: -4px; width: 26px; height: 30px; object-fit: contain; }
.card h3 { font-size: 19px; line-height: 1.1; }
.chip { display: inline-flex; gap: 4px; align-items: center; margin-top: 4px; padding: 1px 10px; font: 400 16px var(--head); background: linear-gradient(var(--gold1), var(--gold2) 50%, var(--gold3)); border: 2px solid var(--ink); border-radius: 999px; }
.chip img { width: 16px; height: 18px; }
.card p { flex: 1; margin: 10px 0; font-size: 15.5px; }
.when { padding: 5px 10px; font-size: 14.5px; color: #fff; background: var(--green4); border-radius: 8px; }
.when b { color: #dcffbc; margin-inline-end: 6px; letter-spacing: .03em; }

.queue { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.qi { position: relative; width: 92px; padding: 6px 4px 4px; text-align: center; font-weight: 900; font-size: 12.5px; line-height: 1.1; background: #fff2c9; border: 3px solid #c98a14; border-radius: 10px; }
.qi.trap { background: #e4e0ff; border-color: #7a6be0; }
.qi.hero { background: #ffdede; border-color: var(--red2); }
.qi.hall { background: #cfeaff; border-color: var(--blue2); }
.qi .n { position: absolute; top: 2px; inset-inline-end: 5px; font: 400 18px var(--head); }
.ic { display: inline-block; flex: none; background-repeat: no-repeat; }
.qi .ic { margin: 0 auto 2px; display: block; }

.agenda { display: flex; flex-direction: column; gap: 10px; }
.day { background: var(--card); border: 3px solid var(--line); border-radius: 14px; overflow: hidden; }
.day summary { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 2px 10px; min-height: 48px; padding: 10px 14px; font: 400 19px var(--head); cursor: pointer; list-style: none; }
.day summary::-webkit-details-marker { display: none; }
.day.today { border-color: var(--green3); box-shadow: 0 0 0 2px var(--green3); }
.day .sum { display: inline-flex; gap: 8px; align-items: center; font: 800 14.5px var(--body); color: #5a3517; }
.day .sum img { width: 16px; height: 20px; object-fit: contain; display: inline-block; }
.tag { padding: 0 8px; font: 400 14px/1.6 var(--head); color: #fff; background: var(--green4); border-radius: 6px; }
.day ul { margin: 0; padding: 0 10px 10px; list-style: none; }
.day li { border-top: 1px solid #a97c3f55; }
.day li > label, .day li > div { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; min-height: 46px; padding: 6px 4px; font-size: 15.5px; line-height: 1.2; cursor: pointer; }
.day li input { width: 22px; height: 22px; flex: none; accent-color: var(--green4); }
.day li.done span.txt { text-decoration: line-through; opacity: .62; }
.day li time { min-width: 44px; flex: none; font: 400 15px var(--head); color: var(--blue2); }
.day li .txt { flex: 1 1 120px; min-width: 0; }
.day li .who { margin-inline-start: auto; padding: 1px 8px; font-size: 12.5px; font-weight: 900; color: #0e4a26; background: #d8f3c2; border-radius: 6px; white-space: nowrap; }
.day li img { width: 30px; height: 34px; object-fit: contain; flex: none; }

.poster-box { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.poster-box img { width: 100%; height: auto; border: 3px solid var(--ink); border-radius: 12px; background: #478a30; }
#poster-out { width: 100%; }
.mission { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.mission > div { background: var(--card); border: 3px solid var(--line); border-radius: 12px; overflow: hidden; }
.mission h3 { padding: 8px 10px; text-align: center; font-size: 18px; color: #fff; text-shadow: 0 2px 0 var(--ink); background: linear-gradient(var(--blue1), var(--blue2)); }
.mission div:nth-child(1) h3 { background: linear-gradient(var(--red1), var(--red2)); }
.mission div:nth-child(3) h3 { background: linear-gradient(var(--green2), var(--green4)); }
.mission ul { margin: 0; padding-block: 10px; padding-inline: 28px 10px; }
.mission li { margin-bottom: 6px; font-size: 15.5px; }

.foot { padding: 22px 16px 30px; text-align: center; font-size: 13.5px; color: #fff; background: linear-gradient(var(--slate1), var(--slate2)); border-top: 5px solid var(--ink); margin-top: 26px; }
.foot p { max-width: 760px; margin: 0 auto 6px; color: #dce6f2; }
.calc { margin: 0; padding: 14px 16px; color: #fff4d8; font-size: 14.5px; background: linear-gradient(var(--slate1), var(--slate2)); border: 4px solid var(--ink); border-radius: 14px; }
.calc b { color: #ffd76a; }

@media (max-width: 560px) {
  .hero { padding-top: 62px; padding-bottom: 84px; }
  main { padding: 14px 20px 20px; }
  .panel { padding: 62px 12px 16px; box-shadow: 0 0 0 6px var(--wood2), 0 0 0 9px var(--ink); }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 10px 6px; }
  .stat h3 { font-size: 12px; }
  .stat strong { font-size: 23px; }
  .stat small { font-size: 12.5px; line-height: 1.2; display: block; }
  .lad { grid-template-columns: 100px 1fr 44px; }
  .lad > span:first-child { font-size: 14.5px; }
  .lad .bar { min-width: 84px; font-size: 14px; padding: 0 6px; }
  .lad .gain { display: none; }
  .grid { grid-template-columns: 1fr 1fr; }
  .queue .qi { width: calc(33.3% - 6px); }
}
