:root {
  --ink:#203f35;
  --muted:#6b776f;
  --paper:#f7f7ef;
  --line:#dce2d8;
  --accent:#e3edb1
}
* {
  box-sizing:border-box
}
body {
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font:16px/1.6 system-ui,-apple-system,Segoe UI,sans-serif
}
a {
  color:inherit;
  text-decoration:none
}
a:hover {
  text-decoration:underline
}
button,input,textarea,select {
  font:inherit
}
button,a,input,select,textarea {
  touch-action:manipulation
}
button {
  cursor:pointer
}
button:disabled {
  cursor:default
}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible {
  outline:3px solid #c27630;
  outline-offset:3px
}
[hidden] {
  display:none!important
}
.top {
  max-width:1260px;
  margin:auto;
  padding:28px 40px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  border-bottom:1px solid var(--line)
}
.brand {
  display:flex;
  align-items:center;
  gap:12px;
  font-size:18px;
  font-weight:800;
  letter-spacing:2px
}
.brand small {
  display:block;
  letter-spacing:0;
  font-weight:400;
  font-size:11px;
  color:var(--muted)
}
.mark {
  width:44px;
  height:48px;
  border:1px solid var(--ink);
  border-radius:50% 50% 8px 8px;
  text-align:center;
  line-height:46px;
  font-family:Georgia;
  font-size:28px
}
.subtle {
  font-size:13px;
  color:var(--muted)
}
main {
  max-width:1260px;
  margin:auto;
  padding:42px 40px 0
}
.eyebrow {
  font-size:10px;
  letter-spacing:2px;
  font-weight:700;
  color:var(--muted)
}
.intro {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin:14px 0 34px
}
h1 {
  font-family:Georgia,serif;
  font-size:clamp(38px,5vw,64px);
  font-weight:400;
  line-height:1.08;
  letter-spacing:-2px;
  margin:8px 0 18px
}
h1 em {
  font-weight:400;
  color:#738657
}
p {
  color:var(--muted);
  margin:8px 0 16px
}
.intro p {
  max-width:610px;
  font-size:14px
}
.intro-note {
  transform:rotate(6deg);
  padding:20px 45px;
  font-family:Georgia;
  font-style:italic;
  font-size:23px;
  line-height:1.3
}
.intro-note span {
  display:block;
  font-size:45px;
  color:#9bab73
}
.game-layout {
  display:grid;
  grid-template-columns:minmax(0,1.65fr) minmax(300px,1fr);
  gap:28px;
  align-items:start
}
.board-card {
  border:1px solid var(--line);
  background:white;
  border-radius:18px;
  padding:18px;
  box-shadow:0 8px 30px #243a2410
}
.board-head,.board-foot {
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  font-size:12px
}
.board-head {
  padding:0 0 14px;
  font-weight:600
}
.pill {
  background:#f0f3e8;
  padding:5px 12px;
  border-radius:20px;
  white-space:nowrap
}
.board {
  position:relative;
  aspect-ratio:4/3;
  border-radius:10px;
  overflow:hidden;
  background:#386454
}
.board img {
  width:100%;
  height:100%;
  object-fit:fill;
  display:block
}
.tiles {
  position:absolute;
  inset:0;
  display:grid
}
.tiles button {
  background:transparent;
  border:1px solid #ffffff32;
  color:#ffffffa0;
  font-size:11px;
  display:flex;
  align-items:end;
  padding:10px;
  transition:background .2s,opacity .3s
}
.tiles button:hover {
  background:#ffffff19
}
.tiles button.open {
  opacity:0;
  pointer-events:none
}
.board-foot {
  padding-top:14px;
  color:var(--muted);
  font-size:10px
}
.play-card {
  border:1px solid var(--line);
  border-radius:18px;
  background:#fff;
  padding:28px
}
h2 {
  font-family:Georgia;
  font-weight:400;
  font-size:28px;
  line-height:1.2;
  margin:10px 0 22px
}
.stats {
  display:grid;
  grid-template-columns:1fr 1fr;
  border-bottom:1px solid var(--line);
  padding:0 0 22px;
  margin-bottom:22px
}
.stats>div+div {
  border-left:1px solid var(--line);
  padding-left:24px
}
.stats strong {
  display:block;
  font-family:Georgia;
  font-size:38px;
  line-height:1.2
}
.stats span {
  font-size:11px;
  color:var(--muted)
}
label {
  display:block;
  font-size:12px;
  font-weight:600;
  margin:14px 0 6px
}
input,textarea,select {
  width:100%;
  border:1px solid var(--line);
  border-radius:8px;
  padding:12px;
  background:#fcfcf8;
  color:var(--ink)
}
textarea {
  min-height:90px;
  resize:vertical
}
.primary,.secondary {
  display:block;
  width:100%;
  border:0;
  border-radius:8px;
  padding:13px 18px;
  margin-top:12px;
  text-align:left;
  min-height:48px;
  font-size:14px;
  font-weight:600
}
.primary {
  background:var(--ink);
  color:white
}
.primary:hover {
  background:#345c4a
}
.primary span {
  float:right
}
.secondary {
  background:var(--accent);
  color:var(--ink)
}
#message {
  font-size:11px;
  min-height:35px;
  margin:12px 0
}
.text-button {
  background:none;
  border:0;
  color:var(--muted);
  font-size:11px;
  padding:10px 0;
  min-height:44px;
  text-decoration:underline
}
.rules {
  display:flex;
  gap:16px;
  padding:24px 10px
}
.rule-icon {
  font-size:34px
}
.rules h3 {
  font-size:12px;
  margin:3px 0
}
.rules p {
  font-size:11px;
  margin:4px 0
}
.rules>div {
  max-width:300px
}
footer {
  display:flex;
  justify-content:space-between;
  margin-top:48px;
  border-top:1px solid var(--line);
  padding:24px 0;
  font-size:10px;
  letter-spacing:1px;
  color:var(--muted)
}
.admin-layout {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:24px
}
.admin-layout section:last-child {
  grid-column:1/-1
}
.admin-layout section:last-child form {
  max-width:650px
}
.round-row {
  display:flex;
  gap:14px;
  align-items:center;
  border-bottom:1px solid var(--line);
  padding:16px 0
}
.round-row img {
  width:80px;
  height:65px;
  object-fit:cover;
  border-radius:6px
}
.round-row p,.round-row a {
  font-size:12px
}
.round-row form {
  margin-left:auto
}
.check {
  display:flex;
  gap:10px;
  align-items:center
}
.check input {
  width:18px;
  height:18px
}
.upload-preview {
  width:100%;
  max-height:260px;
  object-fit:contain;
  margin:12px 0
}
.alert,.success {
  padding:16px;
  border-radius:10px;
  background:#ffe6de;
  color:#782800
}
.success {
  background:#e3edb1;
  color:var(--ink)
}
.login {
  max-width:480px
}
.logout {
  max-width:200px;
  margin-bottom:24px
}
input[type=color] {
  height:48px
}
#result-text {
  font-size:14px
}
@media(max-width:850px) {
  .game-layout,.admin-layout {
  grid-template-columns:1fr
}
.intro-note {
  display:none
}
.top {
  padding:20px 22px
}
main {
  padding:30px 22px 0
}
.intro {
  margin-bottom:24px
}
.play-card {
  padding:24px
}
.board-card {
  padding:12px
}
footer {
  gap:20px
}
.admin-layout section:last-child {
  grid-column:auto
}

}
@media(prefers-reduced-motion:reduce) {
  * {
  transition:none!important
}

}
