.k0k9-main {
  padding-left: 16px;
  padding-right: 16px;
  padding-bottom: 48px;
  color: #2a2118;
}

.k0k9-stage {
  width: min(760px, 100%);
  margin: 18px auto 0;
}

.k0k9-wood {
  background:
    linear-gradient(180deg, rgba(255, 248, 236, 0.35), transparent 28%),
    repeating-linear-gradient(90deg, #6d4a2e 0 14px, #7a5536 14px 18px, #5c3d26 18px 34px);
  border-radius: 18px 18px 8px 8px;
  padding: 18px 16px 14px;
  box-shadow: 0 16px 36px rgba(40, 22, 10, 0.28);
}

.k0k9-rim {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  color: #f3e2c8;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.k0k9-tray {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 8px;
  background: #3d291b;
  border-radius: 10px;
  padding: 12px 8px 14px;
}

.k0k9-type {
  min-height: 78px;
  border: 0;
  border-radius: 8px 8px 10px 10px;
  background: linear-gradient(180deg, #8d9a90, #5d6a62 42%, #3e4944);
  color: #1b2420;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -8px 0 rgba(0, 0, 0, 0.18),
    0 6px 0 #24160e;
  font-family: "Palatino Linotype", Palatino, "Songti SC", serif;
  font-size: 15px;
  font-weight: 700;
  cursor: default;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 2px 6px;
}

.k0k9-type .k0k9-ico {
  font-size: 28px;
  line-height: 1;
  display: block;
}

.k0k9-type .k0k9-lab {
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  display: block;
  letter-spacing: 0;
}

.k0k9-type[data-ink="1"] { box-shadow: inset 0 0 0 2px rgba(176, 58, 46, 0.35), 0 6px 0 #24160e; }
.k0k9-type[data-ink="2"] { background: linear-gradient(180deg, #b7a090, #7d5344); color: #3a140f; }
.k0k9-type[data-ink="3"] { background: linear-gradient(180deg, #c46a55, #8d3428); color: #2a0c09; }
.k0k9-type[data-ink="4"] { background: linear-gradient(180deg, #d24b38, #8d2218); color: #fff4ea; }
.k0k9-type[data-ink="5"] { background: linear-gradient(180deg, #e23b28, #6e120e); color: #fff8f2; }

.k0k9-type.is-live {
  transform: translateY(-6px);
  outline: 2px solid #f2d7a2;
}

.k0k9-type.is-struck {
  animation: k0k9-strike 220ms ease;
}

.k0k9-sheet {
  margin-top: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(196, 74, 58, 0.05), transparent 28%),
    linear-gradient(180deg, #f7f1e4, #efe4d0);
  border-radius: 0 0 16px 16px;
  min-height: 420px;
  padding: 28px 22px 24px;
  box-shadow: 0 18px 30px rgba(48, 28, 14, 0.12);
  color: #2a2118;
}

.k0k9-dry .k0k9-type {
  filter: blur(0.4px) saturate(0.7);
  opacity: 0.65;
}

.k0k9-lead {
  margin: 18px 0 8px;
  font-size: 28px;
  line-height: 1.25;
  font-family: "Palatino Linotype", Palatino, "Songti SC", serif;
}

.k0k9-aside {
  margin: 0 0 18px;
  color: #5c4636;
}

.k0k9-gates {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.k0k9-seal {
  border: 2px dashed #8d3428;
  background: #fffaf3;
  color: #6e2218;
  border-radius: 999px;
  min-height: 48px;
  padding: 10px 18px;
  cursor: pointer;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.k0k9-seal::before {
  content: '☐';
  font-size: 18px;
  line-height: 1;
}

.k0k9-seal.is-on {
  background: #8d2218;
  color: #fff6ee;
  border-style: solid;
}

.k0k9-seal.is-on::before {
  content: '☑';
}

.k0k9-hint {
  margin: -4px 0 14px;
  font-size: 12px;
  color: #8d3428;
  text-align: center;
}

.k0k9-dip {
  min-height: 52px;
  min-width: 148px;
  border: 0;
  border-radius: 999px;
  background: #7a1d16;
  color: #fff6ee;
  font-size: 18px;
  cursor: pointer;
}

.k0k9-dip:disabled {
  background: #c8b5a2;
  color: #6d5b4e;
  cursor: not-allowed;
}

.k0k9-q {
  font-size: 22px;
  line-height: 1.45;
  font-family: "Palatino Linotype", Palatino, "Songti SC", serif;
  margin: 8px 0 8px;
}

.k0k9-note {
  color: #8d3428;
  font-size: 13px;
  min-height: 1.2em;
}

.k0k9-marks {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-top: 22px;
}

.k0k9-mark {
  border: 0;
  background: transparent;
  color: #3a271c;
  cursor: pointer;
  padding: 0;
}

.k0k9-mark i {
  display: grid;
  place-items: center;
  width: min(78px, 100%);
  aspect-ratio: 1;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: #f4ecdf;
  box-shadow: inset 0 0 0 2px #d7c6ae;
  font-style: normal;
  font-family: "Palatino Linotype", Palatino, serif;
  font-size: 22px;
}

.k0k9-mark[data-depth="2"] i { box-shadow: inset 0 0 0 8px rgba(176, 74, 58, 0.28); }
.k0k9-mark[data-depth="3"] i { background: #e7b2a6; }
.k0k9-mark[data-depth="4"] i { background: #c45a48; color: #fff8f3; }
.k0k9-mark[data-depth="5"] i { background: #8d2218; color: #fff8f3; }

.k0k9-mark.is-on i {
  outline: 3px solid #2a2118;
  transform: scale(0.94);
}

.k0k9-mark span {
  display: block;
  font-size: 12px;
  line-height: 1.3;
}

.k0k9-mid {
  margin: 10px 0 0;
  text-align: center;
  color: #8d3428;
  letter-spacing: 0.18em;
}

.k0k9-strip {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
  margin: 8px 0 18px;
}

.k0k9-cell {
  text-align: center;
}

.k0k9-cell b {
  display: block;
  height: 92px;
  border-radius: 4px;
  background: #f6efe4;
  box-shadow: inset 0 0 0 1px #ddcbb6;
}

.k0k9-cell[data-ink="1"] b { background: rgba(176, 58, 46, 0.18); }
.k0k9-cell[data-ink="2"] b { background: rgba(176, 58, 46, 0.38); }
.k0k9-cell[data-ink="3"] b { background: rgba(166, 42, 32, 0.62); }
.k0k9-cell[data-ink="4"] b { background: #b42318; }
.k0k9-cell[data-ink="5"] b { background: #6e120e; }

.k0k9-cell.is-main b { outline: 3px solid #2a2118; }
.k0k9-cell .k0k9-ico {
  display: block;
  font-size: 12px;
  margin-bottom: 2px;
  line-height: 1;
}
.k0k9-cell small {
  color: #5c4636;
  font-size: 10px;
  font-family: "Palatino Linotype", Palatino, "Songti SC", serif;
  display: block;
}

.k0k9-read {
  display: grid;
  gap: 12px;
}

.k0k9-read article {
  border-top: 1px solid rgba(90, 50, 32, 0.18);
  padding-top: 10px;
}

.k0k9-read h2 {
  margin: 0 0 4px;
  font-size: 20px;
  color: #6e2218;
}

.k0k9-read p { margin: 0 0 6px; }

.k0k9-risk {
  background: #6e120e;
  color: #fff6ee;
  padding: 10px 12px;
  border-radius: 8px;
}

.k0k9-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.k0k9-actions button,
.k0k9-actions a {
  min-height: 42px;
  border-radius: 999px;
  border: 1px solid #6e2218;
  background: #fffaf3;
  color: #6e2218;
  padding: 8px 14px;
  text-decoration: none;
  cursor: pointer;
}

.k0k9-actions .is-main {
  background: #7a1d16;
  color: #fff6ee;
}

.k0k9-share {
  display: block;
  width: min(420px, 100%);
  margin-top: 12px;
  border-radius: 8px;
  background: #fff;
}

.k0k9-foot {
  margin-top: 16px;
  color: #5c4636;
  font-size: 13px;
}

.k0k9-foot .auth-login-link {
  margin-left: 6px;
  display: inline-block;
  background: #6e2218;
  color: #fff6ee;
  padding: 4px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 12px;
  vertical-align: middle;
}

.k0k9-foot .auth-login-link:hover {
  background: #8d3428;
}

.k0k9-links { display: flex; gap: 12px; margin-top: 8px; }
.k0k9-links a { color: #6e2218; }

@media (max-width: 640px) {
  .k0k9-lead, .k0k9-q { font-size: 20px; }
  .k0k9-cell b { height: 64px; }
  .k0k9-marks { gap: 6px; }
  .k0k9-tray { grid-template-columns: repeat(5, 1fr); }
  .k0k9-type { min-height: 72px; }
  .k0k9-type .k0k9-ico { font-size: 30px; }
  .k0k9-type .k0k9-lab { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .k0k9-type.is-live,
  .k0k9-type.is-struck { animation: none; transform: none; }
}

@keyframes k0k9-strike {
  50% { transform: translateY(3px); }
}
