:root {
  --bg: #f6f3ee;
  --ink: #1c1917;
  --header: #fffdf9;
  --card: #fffdf9;
  --card-text: #1c1917;
  --muted: #6f675f;
  --accent: #146c43;
  --accent-soft: #e8f5ee;
  --line: #e6dfd6;
  --danger: #b42318;
  --ok: #146c43;
  --shadow: 0 1px 2px rgba(28, 25, 23, 0.04), 0 16px 40px rgba(28, 25, 23, 0.06);
  --bar: 64px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  letter-spacing: -0.01em;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

a { color: inherit; }

.desk-chrome {
  position: sticky;
  top: 0;
  z-index: 15;
  background: rgba(255, 253, 249, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.desk-chrome .topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  background: transparent;
  border-bottom: 0;
  backdrop-filter: none;
}
.desk-chrome .top-links { flex: 0 0 auto; flex-wrap: nowrap; gap: 10px; }
.top-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1 1 auto;
  min-width: 0;
}
.top-split {
  width: 1px;
  height: 16px;
  background: var(--line);
  flex: 0 0 auto;
}
.desk-chrome .home-actions .primary {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.88rem;
}
.now-line {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 14px;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}
.now-line span {
  color: #6f675f;
  font-size: 0.92rem;
}
.now-line time {
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--bar);
  padding: 10px 28px;
  background: rgba(255, 253, 249, 0.92);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.03em;
}

.brand::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 5px;
  background: linear-gradient(145deg, #1f8a5b, #1a6f8a);
  box-shadow: 0 4px 10px rgba(20, 108, 67, 0.28);
}

.top-links { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 14px; font-size: 0.92rem; }
.top-links a { color: #5c564e; text-decoration: none; }
.top-links a:hover { color: var(--ink); }

.lang-select {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  font: inherit;
}

.lang-select option { color: #111; }

.hero {
  background: linear-gradient(90deg, #159447 0%, #1494c8 100%);
  color: white;
  text-align: center;
  padding: 42px 20px 36px;
}

.hero h1 { margin: 0 0 8px; font-size: clamp(1.7rem, 3vw, 2.3rem); }
.hero p { margin: 0; opacity: 0.95; }
.hero .privacy-badge {
  display: inline-block;
  max-width: 40rem;
  margin: 16px auto 0;
  padding: 10px 16px;
  border-radius: 999px;
  background: #fff;
  color: #14532d;
  font-weight: 700;
  line-height: 1.45;
  opacity: 1;
}
.assure {
  display: inline-block;
  margin: 0 0 16px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #146c43;
  font-weight: 600;
  font-size: 0.88rem;
  line-height: 1.45;
}

.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }

.search-row { margin: 22px auto 8px; }

.search-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 1rem;
  background: white;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
  padding: 18px 0 36px;
}

.tool-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 210px;
  padding: 18px 16px 16px;
  border-radius: 18px;
  background: var(--card);
  color: var(--card-text);
  text-decoration: none;
  border: 1px solid #efeae3;
  box-shadow: var(--shadow);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.tool-card[hidden] { display: none; }
.tool-card:hover { transform: translateY(-3px); box-shadow: 0 18px 36px rgba(28, 25, 23, 0.08); }
.tool-card .icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #f3efe8;
  font-size: 1.25rem;
}
.tool-card h2 { margin: 4px 0 0; font-size: 1.05rem; letter-spacing: -0.02em; }
.tool-card p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.5; flex: 1; font-weight: 400; }
.tool-card.is-added { background: #f7fbf8; border-color: #c9e7d6; }
.tool-card.is-full .open-btn {
  background: transparent;
  color: #8a8178;
  border: 1px solid var(--line);
}
.tool-card:disabled { cursor: default; }

.open-btn {
  align-self: flex-start;
  margin-top: 8px;
  background: var(--accent);
  color: white;
  border: 0;
  border-radius: 999px;
  padding: 7px 14px;
  font-weight: 700;
}

.note {
  background: #1c2430;
  color: #d7dee7;
  border-radius: 16px;
  padding: 22px 24px;
  margin-bottom: 28px;
  line-height: 1.7;
}

.note h2 { margin: 0 0 8px; color: white; font-size: 1.15rem; }
.note p { margin: 0 0 8px; }
.note p:last-child { margin-bottom: 0; }

footer { text-align: center; color: #66717d; padding: 8px 16px 28px; font-size: 0.9rem; }
footer a { color: #2563eb; }

.tool-main { padding: 28px 0 48px; }

.panel {
  background: white;
  border: 1px solid #efeae3;
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.panel h1 { margin: 0 0 8px; font-size: 1.6rem; letter-spacing: -0.03em; }
.lead { margin: 0 0 18px; color: #5c564e; line-height: 1.6; font-weight: 400; }
.back { display: inline-block; margin-bottom: 12px; color: #2563eb; text-decoration: none; }

.dropzone {
  border: 1.5px dashed #cfc6ba;
  border-radius: 16px;
  padding: 32px 16px;
  text-align: center;
  background: #fbf9f6;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone.dragover { border-color: var(--accent); background: var(--accent-soft); }
.convert-outs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.convert-outs button {
  min-height: 42px;
  padding: 8px 16px;
  border: 1px solid #e6dfd6;
  border-radius: 999px;
  background: #fffdf9;
  color: #3d3833;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.convert-outs button:hover { border-color: #ddd3c8; }
.convert-outs button:disabled { opacity: 0.55; cursor: wait; }
.dropzone input { display: none; }

.file-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  color: #364152;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.order-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.order-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.order-item.dragging { opacity: 0.45; }

.order-index {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 999px;
  background: #ecfdf3;
  color: #166534;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.order-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }

.order-actions { display: flex; gap: 6px; }

.order-move {
  font: inherit;
  min-width: 36px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.order-move:disabled { opacity: 0.35; cursor: not-allowed; }

.file-thumb {
  width: 96px;
  height: 72px;
  flex: 0 0 96px;
  border-radius: 8px;
  background: #e8edf2;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-thumb:empty { display: none; }

.file-thumb img,
.file-thumb canvas {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.choice-row { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; align-items: center; }
.choice-row[hidden], label[hidden], .crop-stage[hidden], .hint[hidden] { display: none; }
.preset-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.preset-row button {
  font: inherit;
  background: #fff;
  color: #1f2933;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
}
.preset-row button.active,
.preset-row button:hover { border-color: #16a34a; background: #f0fdf4; }
.hint { margin: 8px 0 0; color: #52606d; }

.crop-stage {
  position: relative;
  margin-top: 10px;
  max-width: 640px;
  background: #111827;
  border-radius: 10px;
  overflow: hidden;
  touch-action: none;
  user-select: none;
}

.crop-stage img { display: block; width: 100%; height: auto; }

.crop-box {
  position: absolute;
  border: 2px solid #fff;
  box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.55);
  cursor: grab;
  touch-action: none;
}

.crop-box:active { cursor: grabbing; }

.options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

label { display: flex; flex-direction: column; gap: 6px; font-size: 0.92rem; font-weight: 600; }
input[type="number"], input[type="text"], input[type="email"], input[type="password"], input[type="search"], select {
  font: inherit;
  font-weight: 400;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
}
input:focus, select:focus {
  outline: none;
  border-color: #8fbea6;
  box-shadow: 0 0 0 4px rgba(20, 108, 67, 0.12);
}
input.search-input {
  width: 100%;
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 1rem;
}
.check { flex-direction: row; align-items: center; font-weight: 500; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

button.primary {
  background: var(--accent);
  color: white;
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
}

button.primary:hover:not(:disabled) { background: #0f5a38; }
button.primary:disabled { opacity: 0.45; cursor: not-allowed; }

.message { min-height: 1.4em; margin-top: 12px; }
.message.error { color: var(--danger); }
.message.ok { color: var(--ok); }

.preview-wrap { margin-top: 16px; }
.preview-wrap canvas {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  background: #f3f4f6;
}
.preview-wrap.checker {
  background: repeating-conic-gradient(#d7dde4 0% 25%, #fff 0% 50%) 0 0 / 18px 18px;
  border-radius: 10px;
  line-height: 0;
}
.preview-wrap.checker canvas { background: transparent; }

.prose { line-height: 1.7; color: #364152; }
.prose h2 { font-size: 1.1rem; color: #1f2933; }

html.embed .topbar,
html.embed .back { display: none; }
html.embed .tool-main { padding-top: 8px; }
html.embed body { background: #f6f3ee; }
html.embed, html.embed body { height: 100%; }
html.embed .clock-page { width: 100%; height: 100%; margin: 0; padding: 0; display: flex; }
html.embed .clock-page .panel {
  flex: 1;
  margin: 0;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
html.embed .clock-page h1,
html.embed .clock-page .lead { display: none; }
html.embed .clock-panel { padding: 8px 12px 12px; overflow: auto; }

.clock-panel { min-height: 100%; }
.clock-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  min-height: 0;
  container-type: inline-size;
}
html.embed .clock-stage { flex: 1; }
.clock-modes {
  display: inline-flex;
  gap: 2px;
  margin: 0 0 8px;
  padding: 3px;
  border-radius: 999px;
  background: #efeae3;
}
.clock-modes button {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 6px 14px;
  font: inherit;
  font-weight: 700;
  color: #6f675f;
  cursor: pointer;
}
.clock-modes button[aria-pressed="true"] {
  background: #fffdf9;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.08);
}
.clock-readout {
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin: 2px 0 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.045em;
  line-height: 0.9;
  font-weight: 600;
  font-size: clamp(2.8rem, 28cqi, 4.6rem);
}
#readout-frac {
  margin-inline-start: 0.06em;
  font-size: 0.42em;
  font-weight: 600;
  letter-spacing: 0;
  color: #8a8178;
}
.clock-readout.is-done { color: #9a3412; }
.clock-readout.is-done #readout-frac { color: #9a3412; }
.clock-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.clock-done { margin: 0; color: #9a3412; font-weight: 700; }
.clock-setup, .clock-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; justify-content: center; }
.clock-setup label { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 0.78rem; font-weight: 700; color: #8a8178; }
.clock-setup input { width: 72px; text-align: center; font-variant-numeric: tabular-nums; }
.clock-actions { margin: 0; }
.sound-toggle { display: inline-flex; align-items: center; gap: 6px; }
.sound-toggle svg { width: 18px; height: 18px; }
.sound-toggle.is-muted { color: #8a8178; }
.sound-toggle.is-muted .sound-waves,
.sound-toggle:not(.is-muted) .sound-mute { display: none; }
.clock-actions button:not(.primary) {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 700;
  color: #3d3833;
  cursor: pointer;
}
.clock-laps {
  width: min(220px, 100%);
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 72px;
  overflow: auto;
}
.clock-laps li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 0;
  border-bottom: 1px solid #f0ebe4;
  font-variant-numeric: tabular-nums;
  color: #5c564e;
}
html.is-stage, html.is-stage body { height: 100%; background: #f6f3ee; }
html.is-stage .topbar, html.is-stage .back, html.is-stage .clock-page h1, html.is-stage .clock-page .lead { display: none; }
html.is-stage .clock-page { width: 100%; height: 100%; margin: 0; padding: 0; display: flex; }
html.is-stage .clock-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin: 0;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  background: transparent;
  padding: 20px 28px 24px;
}
html.is-stage .clock-stage { flex: 1; height: 100%; justify-content: flex-start; }
html.is-stage .clock-modes { margin-top: 4px; }
html.is-stage .clock-readout {
  flex: 1;
  align-items: center;
  margin: 0;
  font-size: clamp(4.5rem, min(16vw, 22vmin), 12rem);
}
html.is-stage .clock-controls { padding-bottom: 4px; }
html.is-stage.is-running .clock-setup { display: none; }
html.is-stage .clock-done { font-size: clamp(1.15rem, 3vmin, 2rem); }
html.is-stage .clock-laps { width: min(320px, 70vw); max-height: 14vh; }
html.embed .clock-panel,
html.is-stage .clock-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.aid-home {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: min(100%, 560px);
  margin: 0 auto;
  align-content: center;
  overflow: auto;
  flex: 1;
  min-height: 0;
  padding: 4px;
}
.aid-home[hidden],
.aid-view[hidden] { display: none !important; }
.aid-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 92px;
  padding: 12px 8px;
  border: 1px solid #e6dfd6;
  border-radius: 18px;
  background: rgba(255, 253, 249, 0.9);
  color: #3d3833;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.aid-tile svg { width: 28px; height: 28px; padding: 8px; box-sizing: content-box; background: #fffdf9; border-radius: 50%; }
.aid-tile span { font-size: 0.86rem; line-height: 1.25; text-align: center; }
.aid-tile:hover { border-color: #ddd3c8; background: #fff; }
.aid-tile:nth-child(6n + 1) { background: #f6ebe3; }
.aid-tile:nth-child(6n + 2) { background: #e7f0ea; }
.aid-tile:nth-child(6n + 3) { background: #e7eef5; }
.aid-tile:nth-child(6n + 4) { background: #f8f1e4; }
.aid-tile:nth-child(6n + 5) { background: #f6e8ee; }
.aid-tile:nth-child(6n + 6) { background: #f3eee7; }
.aid-view {
  flex: 1;
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  width: 100%;
}
.aid-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  flex: 0 0 auto;
  margin: 0 0 8px;
  padding: 8px 14px;
  border: 1px solid #e6dfd6;
  border-radius: 999px;
  background: #fffdf9;
  color: #3d3833;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.06);
}
.aid-home-btn[hidden] { display: none !important; }
.aid-home-btn svg { width: 18px; height: 18px; }
.aid-scroll {
  flex: 1;
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}
.aid-fields { display: grid; gap: 8px; width: min(100%, 640px); margin: 0 auto; }
.aid-fields label, .aid-count {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #8a8178;
}
.aid-count { flex-direction: row; align-items: center; justify-content: space-between; }
.aid-count input { width: 76px; text-align: center; }
.aid-fields textarea, .score-card input {
  width: 100%;
  border: 1px solid #e6dfd6;
  border-radius: 12px;
  background: #fffdf9;
  font: inherit;
  color: #1c1917;
  padding: 8px 10px;
}
.aid-fields textarea { min-height: 96px; resize: vertical; }
.aid-hint { margin: 0; color: #8a8178; font-size: 0.78rem; }
.aid-view.is-playing .aid-scroll { overflow: hidden; }
.ladder-stage { display: none; min-height: 0; }
.aid-view.is-playing .ladder-stage {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  gap: 10px;
  min-height: 0;
}
.play-bar { display: flex; flex-wrap: wrap; gap: 8px; }
#group-play { display: none; }
.aid-view.is-playing #group-play { display: flex; }
.aid-view.is-playing .group-board { flex: 1; width: 100%; align-content: stretch; }
.aid-go .aid-side { display: none; }
.aid-view.is-playing .aid-go .aid-side { display: inline-flex; }
.ladder-board {
  flex: 1 1 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  display: flex;
  justify-content: center;
  border-radius: 22px;
  background:
    radial-gradient(120px 80px at 8% 0%, rgba(232, 196, 184, 0.45), transparent 70%),
    radial-gradient(140px 90px at 100% 100%, rgba(188, 214, 196, 0.5), transparent 70%),
    #fffdf9;
}
.ladder-board svg { display: block; width: 100%; height: 100%; }
.ladder-board text { fill: #3d3833; font-size: 15px; font-weight: 700; }
html.is-stage .ladder-board text { font-size: clamp(16px, 2.4vmin, 32px); }
.pair-list, .group-card ul { list-style: none; margin: 0; padding: 0; }
.pair-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  width: min(100%, 720px);
  margin: 8px auto 0;
  flex: 0 0 auto;
  opacity: 0;
}
.pair-list li {
  min-height: 64px;
  align-items: center;
  padding: 14px 18px;
  font-size: 1.45rem;
  font-weight: 700;
  border-radius: 16px;
}
.pair-list.is-show { opacity: 1; }
.pair-list.is-show li { animation: aid-rise 0.4s ease both; }
.pair-list li, .group-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(255, 253, 249, 0.92);
  border: 1px solid #efeae3;
}
.pair-list li {
  min-height: 64px;
  align-items: center;
  font-size: 1.45rem;
  font-weight: 700;
}
.group-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}
.group-card { flex-direction: column; align-items: stretch; }
.group-card:nth-child(6n + 1) { background: #f6ebe3; }
.group-card:nth-child(6n + 2) { background: #e7f0ea; }
.group-card:nth-child(6n + 3) { background: #e7eef5; }
.group-card:nth-child(6n + 4) { background: #f8f1e4; }
.group-card:nth-child(6n + 5) { background: #f6e8ee; }
.group-card:nth-child(6n + 6) { background: #f3eee7; }
.group-card h3 { margin: 0; font-size: 0.95rem; }
.group-card li { padding: 3px 0; }
.pick-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 160px;
  text-align: center;
}
.pick-name {
  margin: 0;
  min-height: 1.1em;
  font-weight: 650;
  letter-spacing: -0.04em;
  line-height: 1.05;
  font-size: clamp(2rem, 18cqi, 3.4rem);
  word-break: break-word;
}
.score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  align-content: start;
}
.score-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid #efeae3;
  border-radius: 16px;
  background: rgba(255, 253, 249, 0.92);
}
.score-card:nth-child(6n + 1) { background: #f6ebe3; }
.score-card:nth-child(6n + 2) { background: #e7f0ea; }
.score-card:nth-child(6n + 3) { background: #e7eef5; }
.score-card:nth-child(6n + 4) { background: #f8f1e4; }
.score-card:nth-child(6n + 5) { background: #f6e8ee; }
.score-card:nth-child(6n + 6) { background: #f3eee7; }
.aid-score-bar { justify-content: flex-start; }
.score-num {
  margin: 0;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  letter-spacing: -0.04em;
  font-size: clamp(2.4rem, 16cqi, 3.6rem);
  line-height: 1;
}
.score-pad { display: flex; justify-content: center; gap: 8px; }
.score-pad button { min-width: 52px; min-height: 42px; font-size: 1.3rem; }
.score-remove {
  border: 0;
  background: transparent;
  color: #8a8178;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}
.score-num.is-pop { animation: aid-land 0.35s ease; }
.pick-name.is-spin { opacity: 0.4; }
.pick-name.is-landed { animation: aid-land 0.5s ease; }
.group-card.is-in { animation: aid-rise 0.45s ease both; }
@keyframes aid-rise {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: none; }
}
@keyframes aid-land {
  0% { transform: scale(0.72); }
  58% { transform: scale(1.08); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .pick-name.is-landed, .group-card.is-in, .score-num.is-pop, .pair-list.is-show li { animation: none; }
}
html.embed .aid-home { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
html.is-stage .aid-home {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(100%, 920px);
  gap: 18px;
  align-self: center;
}
html.is-stage .aid-tile { min-height: 26vh; border-radius: 24px; }
html.is-stage .aid-tile svg { width: 44px; height: 44px; padding: 10px; }
html.is-stage .aid-tile span { font-size: clamp(1rem, 2.4vmin, 1.5rem); }
html.is-stage .aid-home-btn { font-size: 1.15rem; min-height: 48px; padding: 10px 18px; }
html.is-stage .aid-fields textarea { min-height: 140px; font-size: 1.05rem; }
html.is-stage .pair-list { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); font-size: clamp(1rem, 2.4vmin, 1.45rem); }
html.is-stage .group-board { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
html.is-stage .group-card h3, html.is-stage .group-card li { font-size: clamp(1rem, 2.2vmin, 1.4rem); }
html.is-stage .pick-name { font-size: clamp(3rem, 12vmin, 8rem); }
html.is-stage .score-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); align-content: center; min-height: 100%; }
html.is-stage .score-num { font-size: clamp(3.2rem, 10vmin, 7rem); }
html.is-stage .score-pad button { min-width: 84px; min-height: 64px; font-size: 2rem; }
html.is-stage .clock-actions button { min-height: 48px; }

html.is-show,
html.is-show body { height: 100%; background: #f6f3ee; }
html.is-show .topbar,
html.is-show .back,
html.is-show .clock-page h1,
html.is-show .clock-page .lead,
html.is-show .aid-home-btn { display: none !important; }
html.is-show .clock-page { width: 100%; height: 100%; margin: 0; padding: 0; display: flex; }
html.is-show .clock-panel {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  background: transparent;
  padding: 52px 16px 14px;
  overflow: hidden;
}
html.is-show .clock-panel::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 52px;
  background: #f6f3ee;
  z-index: 2;
  pointer-events: none;
}
html.is-show .aid-close {
  position: absolute;
  top: 8px;
  inset-inline-end: 16px;
  z-index: 3;
}
html.is-show .aid-scroll { min-height: 0; }
html.is-show .clock-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
html.is-show .clock-controls { margin-top: auto; width: min(100%, 1100px); }
html.is-show .clock-actions { width: 100%; }
html.is-show .clock-actions button { flex: 1 1 0; min-height: 84px; font-size: clamp(1.3rem, 3vmin, 2rem); }
html.is-show .clock-readout {
  flex: 1;
  align-items: center;
  margin: 0;
  font-size: clamp(8rem, 46vmin, 52rem);
}
html.is-show .clock-done { font-size: clamp(1.15rem, 3vmin, 2rem); }
html.is-show .clock-laps { width: min(420px, 80vw); max-height: 18vh; font-size: 1.15rem; }
html.is-show .clock-actions button,
html.is-show .aid-go button:not(.aid-side):not(.aid-quiet) { min-height: 72px; font-size: clamp(1.25rem, 2.8vmin, 1.8rem); }
html.is-show .aid-go { width: min(100%, 1080px); }
html.is-show .ladder-board { flex: 1; width: 100%; min-height: 0; }
html.is-show .ladder-board text { font-size: clamp(28px, 4vmin, 72px); }
html.is-show .aid-now { font-size: clamp(3rem, 10vmin, 7rem); }
html.is-show .pair-list { width: 100%; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); font-size: clamp(1.6rem, 4vmin, 3rem); }
html.is-show .pair-list li { min-height: 72px; font-size: clamp(1.8rem, 4.5vmin, 3.2rem); }
html.is-show .group-board { flex: 1; width: 100%; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); grid-auto-rows: 1fr; }
html.is-show .group-card h3 { font-size: clamp(1.6rem, 4vmin, 3rem); }
html.is-show .group-card li { font-size: clamp(2.2rem, 9vmin, 5rem); padding: 10px 0; }
html.is-show .pick-stage { flex: 1; min-height: 0; width: 100%; }
html.is-show .pick-name { font-size: clamp(5rem, 22vmin, 16rem); }
html.is-show .pick-order {
  width: 100%;
  flex: 1;
  height: 100%;
  align-content: stretch;
  grid-auto-rows: 1fr;
}
html.is-show .pick-order li {
  height: 100%;
  container-type: inline-size;
  font-size: clamp(2.8rem, 24cqi, 10rem);
  line-height: 1.05;
  white-space: nowrap;
}
html.is-show .score-grid { flex: 1; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); grid-auto-rows: 1fr; align-content: stretch; min-height: 0; }
html.is-show .score-num { font-size: clamp(4.5rem, 16vmin, 12rem); }
html.is-show .score-pad button { min-width: 96px; min-height: 72px; font-size: 2.4rem; }

.aid-setup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  flex: 0 0 auto;
}
.aid-setup-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 4px 14px;
  border: 1px solid #e6dfd6;
  border-radius: 999px;
  background: #fffdf9;
  color: #3d3833;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.aid-setup-tab svg { width: 16px; height: 16px; }
.aid-setup.is-shut .aid-setup-tab svg { transform: rotate(180deg); }
.aid-setup-body { width: min(100%, 760px); }
.aid-setup.is-shut .aid-setup-body { display: none; }
.aid-again { display: none; }
.aid-view.is-done .aid-go > button:not(.aid-again) { display: none; }
.aid-view.is-done .aid-again {
  display: inline-flex;
  grid-column: 1 / -1;
  justify-content: center;
  align-items: center;
  min-height: 76px;
}

.aid-close {
  display: none;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 6px 14px;
  border: 1px solid #e6dfd6;
  border-radius: 999px;
  background: #fffdf9;
  color: #3d3833;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.aid-close[hidden] { display: none !important; }
html.is-show .aid-close:not([hidden]) { display: inline-flex; }
.aid-close svg { width: 16px; height: 16px; }

.aid-fields label,
.aid-count { font-size: 1.05rem; color: #3d3833; gap: 8px; }
.aid-count input {
  width: 92px;
  min-height: 52px;
  font-size: 1.35rem;
  border-radius: 14px;
}
.aid-fields textarea {
  min-height: 120px;
  font-size: 1.15rem;
  line-height: 1.45;
  border-radius: 16px;
}
.aid-hint { font-size: 0.95rem; }

.aid-go {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: min(100%, 640px);
  margin: 0 auto;
}
.clock-page .message:empty { display: none; }
html.is-show .clock-setup label { font-size: 1.05rem; color: #3d3833; }
html.is-show .clock-setup input { width: 88px; min-height: 52px; font-size: 1.35rem; }
.aid-go button:not(.aid-side):not(.aid-quiet) {
  min-height: 64px;
  padding: 12px 16px;
  border-radius: 18px;
  font: inherit;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
}
.group-board.is-together .group-card { animation: aid-rise 0.7s ease both; }
.aid-go button.aid-quiet {
  grid-column: 1 / -1;
  justify-self: center;
  min-height: 40px;
  padding: 6px 12px;
  border: 0;
  background: transparent;
  color: #5c564e;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}
.aid-go button.aid-all {
  background: #fffdf9;
  color: #1c1917;
  border: 1px solid #d9cfc3;
}
.aid-go button.aid-all:hover { background: #fff; }
.aid-go .aid-side {
  grid-column: 1 / -1;
  justify-self: center;
  align-items: center;
  min-height: 40px;
  padding: 6px 12px;
  border: 0;
  background: transparent;
  color: #5c564e;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.aid-now {
  margin: 0;
  min-height: 1.15em;
  text-align: center;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  font-size: clamp(1.8rem, 5vmin, 3.2rem);
  color: #1c1917;
}
.aid-now:empty { display: none; }
.pick-name[hidden],
.pick-order[hidden],
#pick-drawn-wrap[hidden] { display: none !important; }
.pick-order {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  width: min(100%, 960px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.pick-order li {
  display: grid;
  place-items: center;
  min-height: 64px;
  padding: 14px 12px;
  border-radius: 18px;
  background: #fffdf9;
  border: 1px solid #efeae3;
  font-weight: 700;
  font-size: clamp(1.3rem, 3.5vmin, 2.2rem);
}
.group-card h3 { font-size: 1.15rem; }
.group-card li { padding: 6px 0; font-size: 1.2rem; font-weight: 650; }
.group-card li.is-in { animation: aid-rise 0.7s ease both; }
.pair-list.is-show li { animation-duration: 0.7s; }
@media (prefers-reduced-motion: reduce) {
  .group-card li.is-in,
  .group-board.is-together .group-card { animation: none; }
}

@media (max-width: 640px) {
  .aid-home { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
}
body.gate {
  background:
    radial-gradient(820px 380px at 8% -8%, #e4f3ea, transparent 62%),
    radial-gradient(640px 320px at 100% 0%, #e6eef6, transparent 58%),
    var(--bg);
}

.gate-main {
  min-height: calc(100vh - var(--bar));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 16px 56px;
}

.auth-form {
  width: min(440px, 100%);
  margin: 0;
  padding: 32px 28px 22px;
}

.auth-form h1 { font-size: 1.85rem; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-weight: 700; }
.auth-form .primary { width: 100%; margin-top: 4px; padding: 12px 16px; }
.auth-form .text-btn { margin-top: 14px; }

.auth-note {
  width: min(440px, 100%);
  margin: 18px 0 0;
  color: #5c564e;
  line-height: 1.65;
  font-size: 0.92rem;
  text-align: center;
}
.auth-note h2 { margin: 0 0 4px; color: var(--ink); font-size: 0.95rem; }
.auth-note p { margin: 0; }

.text-btn {
  background: transparent;
  border: 0;
  color: #3d6b56;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.text-btn:hover { color: #0f5a38; }
.who {
  color: #5c564e;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.88rem;
}

.account-menu { position: relative; }
.account-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #5c564e;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.account-trigger::-webkit-details-marker { display: none; }
.account-trigger:hover,
.account-menu[open] .account-trigger { background: #f1ebe3; color: var(--ink); }
.account-trigger:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.account-trigger svg { flex: 0 0 auto; transition: transform 0.15s ease; }
.account-menu[open] .account-trigger svg { transform: rotate(180deg); }
.account-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  min-width: 190px;
  display: flex;
  flex-direction: column;
  padding: 6px;
  border: 1px solid #efeae3;
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.account-panel a,
.account-panel button {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.account-panel a:hover,
.account-panel button:hover { background: #f4f0e9; color: var(--ink); }
.account-panel a:focus-visible,
.account-panel button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.account-panel #logout { margin-top: 4px; border-top: 1px solid #f0e9df; border-radius: 0 0 10px 10px; padding-top: 12px; color: #6f675f; }
.account-panel [hidden] { display: none !important; }
.desk-body {
  min-height: calc(100vh - var(--bar));
  background:
    radial-gradient(880px 420px at 8% -12%, #e5f3ea, transparent 62%),
    radial-gradient(680px 360px at 100% 0%, #e6eef6, transparent 58%),
    #f3efe8;
}
.desk-chrome .brand { flex: 0 0 auto; white-space: nowrap; }
.home-hint {
  margin: 0;
  min-width: 0;
  flex: 1 1 auto;
  color: #6f675f;
  font-size: 0.8rem;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tool-dock {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 18px 0;
}
.dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  width: 92px;
  min-height: 78px;
  padding: 10px 6px 8px;
  border: 1px solid #efeae3;
  border-radius: 16px;
  background: rgba(255, 253, 249, 0.96);
  color: #3d3833;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
}
.dock-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #6f675f;
}
.dock-icon svg { width: 22px; height: 22px; }
.dock-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 100%;
}
.dock-item:hover {
  border-color: #ddd3c8;
  color: #1c1917;
}
.dock-item:hover .dock-icon { color: #1c1917; }
.home-actions { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.home {
  --gap: 14px;
  --row: calc((100cqw - 11 * var(--gap)) / 12);
  --half: calc((var(--row) - var(--gap)) / 2);
  container-type: inline-size;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: var(--half);
  gap: var(--gap);
  padding: 10px 18px 32px;
  min-height: calc(100vh - var(--bar));
  align-content: start;
}
.home-empty {
  grid-column: 1 / -1;
  margin: 48px auto;
  max-width: 28rem;
  text-align: center;
  color: #6f675f;
  line-height: 1.6;
}
.home-empty p { margin: 0 0 16px; }
.home-empty .primary { padding: 12px 22px; border-radius: 999px; }
.home-empty[hidden] { display: none; }
.widget {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: 22px;
  background: rgba(255, 253, 249, 0.96);
  border: 1px solid #efeae3;
  box-shadow: var(--shadow);
}
.widget-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding-block: 6px;
  padding-inline: 12px 10px;
  background: #fffdf9;
  border-bottom: 1px solid #f0ebe4;
  user-select: none;
}
.widget-win {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
}
.widget-icon { width: 1.3em; text-align: center; }
.widget-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
}
.widget-full,
.widget-min,
.widget-remove {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid #e6ddd4;
  border-radius: 50%;
  background: linear-gradient(180deg, #fff 0%, #f6f1ea 100%);
  box-shadow: 0 1px 1px rgba(28, 25, 23, 0.05);
  color: #6f675f;
  cursor: pointer;
}
.widget-full:hover,
.widget-min:hover {
  color: #1c1917;
  border-color: #ddd3c8;
  background: #fff;
}
.widget-remove:hover,
.widget-remove:focus-visible {
  color: #fff;
  border-color: #9a2f22;
  background: #b3402f;
  outline: none;
}
.widget-full[aria-pressed="true"],
.widget-min[aria-pressed="true"] {
  color: #1c1917;
  background: #f3ece4;
  border-color: #ddd2c6;
}
.widget.is-min {
  align-self: stretch;
  height: 100%;
  min-height: 0;
}
.widget.is-min .widget-bar {
  min-height: 0;
  height: 100%;
  padding-block: 0;
  border-bottom: 0;
}
.widget.is-min .widget-full,
.widget.is-min .widget-min,
.widget.is-min .widget-remove {
  width: 20px;
  height: 20px;
}
.widget.is-min iframe,
.widget.is-min .widget-resize { display: none; }
.widget-nav,
.widget-nav[hidden] { display: none; }
.widget:fullscreen .widget-nav:not([hidden]),
.widget:-webkit-full-screen .widget-nav:not([hidden]),
.widget.is-cover .widget-nav:not([hidden]) { display: block; }
.widget-step {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(230, 221, 212, 0.95);
  border-radius: 50%;
  background: rgba(255, 253, 249, 0.94);
  color: #3d3833;
  box-shadow: 0 8px 24px rgba(28, 25, 23, 0.12);
  cursor: pointer;
  transform: translateY(-50%);
}
.widget-step.prev { inset-inline-start: 16px; }
.widget-step.next { inset-inline-end: 16px; }
.widget-step:hover { background: #fff; color: #1c1917; }
.ask-sheet {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
}
.ask-sheet[hidden] { display: none; }
.ask-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(28, 25, 23, 0.28);
}
.ask-card {
  position: relative;
  width: min(420px, 100%);
  background: #fffdf9;
  border: 1px solid #efeae3;
  border-radius: 22px;
  padding: 22px 22px 18px;
  box-shadow: var(--shadow);
}
.ask-name {
  margin: 0 0 4px;
  color: #8a8178;
  font-size: 0.82rem;
  font-weight: 700;
}
.ask-card h2 { margin: 0 0 8px; font-size: 1.35rem; letter-spacing: -0.03em; }
.ask-lead { margin: 0 0 16px; color: #5c564e; line-height: 1.55; }
.ask-check {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-weight: 600;
}
.ask-check input { width: 18px; height: 18px; accent-color: #146c43; }
.ask-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.ask-quiet {
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 700;
  color: #3d3833;
  cursor: pointer;
}
.ask-actions .primary:disabled { opacity: 0.4; }
.widget:fullscreen,
.widget:-webkit-full-screen,
.widget.is-cover {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: #f6f3ee;
}
.widget.is-cover {
  position: fixed;
  inset: 0;
  z-index: 40;
}
body.has-cover { overflow: hidden; }
.widget iframe {
  flex: 1;
  width: 100%;
  min-height: 0;
  border: 0;
  background: #f6f3ee;
}
.widget-resize {
  display: inline-grid;
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: white;
  box-shadow: 0 2px 8px rgba(28, 25, 23, 0.16);
  cursor: nwse-resize;
  z-index: 2;
  touch-action: none;
}
.widget-resize:hover { background: #fffdf9; box-shadow: 0 3px 10px rgba(28, 25, 23, 0.2); }
.widget:fullscreen .widget-resize,
.widget:-webkit-full-screen .widget-resize,
.widget.is-cover .widget-resize { display: none; }
.widget-resize::before {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid #5c564e;
  border-bottom: 2px solid #5c564e;
}
.widget-bar { cursor: grab; touch-action: none; }
.widget-grip { display: grid; flex: 0 0 auto; color: #b7aea4; }
.widget.is-dragging { z-index: 5; box-shadow: 0 16px 36px rgba(70, 58, 42, 0.16); }
.widget.is-dragging .widget-bar,
.widget.is-dragging.is-icon { cursor: grabbing; }
.widget.is-dragging iframe { pointer-events: none; }
.widget-slot {
  border-radius: 22px;
  border: 1.5px dashed #c8bfb4;
  background: rgba(255, 253, 249, 0.45);
  pointer-events: none;
}

.storage-bar {
  margin: 14px 18px 0;
}
.storage-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.storage-line p {
  margin: 0;
  color: #5c564e;
  font-size: 0.84rem;
}
.storage-track {
  height: 6px;
  margin-top: 8px;
  border-radius: 999px;
  background: #e7e1d8;
  overflow: hidden;
}
.storage-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: #1f7a4d;
}
.files-panel .storage-bar { margin: 18px 0 0; }
.file-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #efeae3;
  border-radius: 16px;
  background: #fffdf9;
}
.file-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-size {
  flex: 0 0 auto;
  color: #6f675f;
  font-size: 0.82rem;
}
.files-empty { margin: 18px 0 0; color: #6f675f; }
.files-actions { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.files-drop { margin: 0; color: #6f675f; font-size: 0.84rem; }
.files-panel.is-drop { outline: 1.5px dashed #1f7a4d; outline-offset: -12px; }

.catalog-sheet { position: fixed; inset: 0; z-index: 20; }
.catalog-sheet[hidden] { display: none !important; }
.catalog-backdrop { position: absolute; inset: 0; border: 0; background: rgba(28, 25, 23, 0.28); }
.catalog-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(760px, 100%);
  overflow: auto;
  background: #f6f3ee;
  box-shadow: -18px 0 40px rgba(28, 25, 23, 0.12);
}
.catalog { width: min(720px, calc(100% - 32px)); margin: 0 auto 36px; }
.catalog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.catalog-head h2 { margin: 22px 0 0; font-size: 1.45rem; letter-spacing: -0.03em; }
.search-row { margin-top: 16px; }
button.tool-card { width: 100%; text-align: left; font: inherit; cursor: pointer; }
.memo-page .memo-panel {
  display: flex;
  flex-direction: column;
  min-height: 520px;
}
html.embed .memo-page {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
}
html.embed .memo-page .memo-panel {
  flex: 1;
  height: 100%;
  min-height: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 12px 16px 18px;
}
html.embed .memo-page h1,
html.embed .memo-page .lead { display: none; }

.memo-note .memo-panel {
  background:
    radial-gradient(120px 80px at 100% 0%, rgba(232, 196, 184, 0.35), transparent 70%),
    linear-gradient(180deg, #fffaf4, #fffdf9);
}
.memo-todo .memo-panel {
  background:
    radial-gradient(140px 90px at 0% 0%, rgba(244, 196, 168, 0.38), transparent 72%),
    linear-gradient(180deg, #fff8f4, #fffdf9);
}
.memo-check .memo-panel {
  background:
    radial-gradient(140px 90px at 100% 0%, rgba(188, 214, 196, 0.55), transparent 72%),
    linear-gradient(180deg, #f7fbf8, #fffdf9);
}

.memo-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  min-width: 0;
}
.memo-chips {
  display: flex;
  gap: 6px;
  min-width: 0;
  flex: 1;
  overflow-x: auto;
}
.memo-chips button {
  border: 0;
  background: rgba(255, 255, 255, 0.72);
  color: #5c564e;
  border-radius: 999px;
  padding: 5px 10px;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  max-width: 128px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px #efe4d8;
}
.memo-chips button[aria-pressed="true"] {
  background: var(--ink);
  color: white;
  box-shadow: none;
}
.memo-new {
  border: 1px dashed #d9cfc3;
  background: rgba(255, 255, 255, 0.55);
  color: #5c564e;
  border-radius: 999px;
  padding: 5px 10px;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  white-space: nowrap;
}
.memo-new:disabled { opacity: 0.4; cursor: not-allowed; }

.memo-note .memo-title,
.memo-check .memo-title {
  width: 100%;
  border: 0;
  border-radius: 0;
  background: linear-gradient(#d7efe0, #d7efe0) left 2px top 0 / 46px 7px no-repeat;
  box-shadow: none;
  padding: 14px 2px 4px;
  font-size: 1.08rem;
  font-weight: 700;
}
[dir="rtl"] .memo-note .memo-title,
[dir="rtl"] .memo-check .memo-title {
  background-position: right 2px top 0;
}
.memo-note .memo-title:focus,
.memo-check .memo-title:focus {
  border-color: transparent;
  box-shadow: none;
}
.memo-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
}
.memo-tools button {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px #efe4d8;
  color: #3d3833;
  font: inherit;
  font-size: 0.92rem;
  line-height: 1;
  cursor: pointer;
}
.memo-tools button[aria-pressed="true"] {
  background: var(--ink);
  color: white;
  box-shadow: none;
}
.memo-tools select {
  height: 32px;
  margin-left: 2px;
  padding: 0 8px;
  border-radius: 10px;
  font-size: 0.82rem;
}
[dir="rtl"] .memo-tools select { margin-left: 0; margin-right: 2px; }
.memo-write {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 2px 2px 8px;
  border: 0;
  background: transparent;
  box-shadow: none;
  line-height: 1.6;
  font-size: 1rem;
  color: #2c261f;
  outline: none;
}
.memo-write[data-empty="true"]::before {
  content: attr(data-placeholder);
  color: #b0a69c;
  pointer-events: none;
}
.memo-write u { text-underline-offset: 3px; }

.memo-compose {
  display: flex;
  gap: 8px;
  align-items: center;
}
.memo-compose input {
  flex: 1;
  min-width: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
}
.memo-plus {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}
.memo-plus:hover { background: #3a342e; }

.memo-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  margin-top: 10px;
}
.memo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.memo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 0 0 1px #f3e7dc;
}
.todo-day {
  margin: 0 0 12px;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  color: #3d3833;
}
.todo-cal {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: #8a8178;
}
.memo-todo .memo-row { background: #fff6f1; }
.memo-todo .memo-row.is-event { background: #f6f3ee; }
.memo-check .memo-row { background: #f4faf6; }
.memo-label,
.memo-row > span:not(.memo-index) {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.memo-todo .memo-row.is-done > span {
  color: #b3a89e;
  text-decoration: line-through;
}
.memo-check .memo-row.is-done .memo-label { color: #3f6d52; }
.memo-index {
  flex: 0 0 auto;
  width: 1.7em;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: #b0a69c;
}
.memo-tick {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid #ddcfc2;
  background: white center / 12px 12px no-repeat;
  cursor: pointer;
}
.memo-todo .memo-row.is-done .memo-tick {
  border-color: #c46b4a;
  background-color: #c46b4a;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.2 4.6 9 10 3' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.memo-check .memo-row.is-done .memo-tick {
  border-color: #146c43;
  background-color: #146c43;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.2 4.6 9 10 3' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.memo-x {
  border: 0;
  background: transparent;
  color: #c2b6aa;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}
.memo-x:hover { color: var(--danger); }
.memo-empty {
  margin: 28px 0;
  text-align: center;
  color: #9a9188;
  font-size: 0.92rem;
}
.memo-empty::before {
  content: "";
  display: block;
  width: 42px;
  height: 42px;
  margin: 0 auto 8px;
  border-radius: 50%;
  border: 1.5px dashed #e3d5c8;
}
.memo-meter {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 10px;
}
.memo-meter p {
  margin: 0;
  min-width: 3.2em;
  font-size: 0.82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #3f6d52;
}
.memo-track {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: #e7efe9;
  overflow: hidden;
}
.memo-track span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #9dceae, #146c43);
}
.memo-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}
.memo-local {
  margin: 0;
  color: #a3988e;
  font-size: 0.75rem;
}
.memo-foot .text-btn { font-size: 0.8rem; }
.memo-foot .text-btn[hidden] { display: none; }

.att-top {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
}
.att-top[hidden] { display: none; }
.att-top .text-btn { margin-left: auto; font-size: 0.82rem; }
.att-date {
  flex: 0 1 auto;
  margin: 0 4px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.05rem;
}
.att-step {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #6f675f;
  cursor: pointer;
}
.att-step:hover { background: #f1ebe3; color: var(--ink); }
.att-sum {
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #3f6d52;
}
.att-sum[hidden] { display: none; }
.att-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 6px;
}
.att-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 0;
  border-radius: 14px;
  background: #f4faf6;
  box-shadow: inset 0 0 0 1px #e1eee6;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease, box-shadow 0.12s ease;
}
.att-row:hover { box-shadow: inset 0 0 0 1px #c9dfd2; }
.att-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.att-no {
  flex: 0 0 auto;
  min-width: 1.4em;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  color: #9fb4a7;
}
.att-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.att-state {
  flex: 0 0 auto;
  font-size: 0.74rem;
  color: #7a9a88;
}
.att-row.is-absent { background: #fdecea; box-shadow: inset 0 0 0 1px #f2c6bf; }
.att-row.is-absent .att-state { color: var(--danger); font-weight: 700; }
.att-row.is-late { background: #fff4dc; box-shadow: inset 0 0 0 1px #efd9a0; }
.att-row.is-late .att-state { color: #8f5b00; font-weight: 700; }
.att-row.is-early { background: #e9f1fb; box-shadow: inset 0 0 0 1px #c3d6ee; }
.att-row.is-early .att-state { color: #2d5b94; font-weight: 700; }
.att-roster[hidden] { display: none; }
.att-roster textarea {
  display: block;
  width: 100%;
  min-height: 180px;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  line-height: 1.55;
  resize: vertical;
}
.att-roster textarea:focus {
  outline: none;
  border-color: #8fbea6;
  box-shadow: 0 0 0 4px rgba(20, 108, 67, 0.12);
}
.att-note {
  margin: 6px 2px 0;
  color: #a3988e;
  font-size: 0.78rem;
}
.att-roster-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}
.memo-attend .memo-foot,
.memo-phrases .memo-foot { flex-wrap: wrap; row-gap: 6px; }
.att-foot-actions { display: flex; gap: 12px; margin-left: auto; }

.ph-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ph-row { display: flex; align-items: stretch; gap: 4px; }
.ph-main {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 10px 14px;
  border: 1px solid #efeae3;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.ph-main:hover { border-color: #cfe3d7; background: #fbfdfb; }
.ph-main:focus-visible,
.ph-edit:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ph-main.is-copied { border-color: #8fbea6; background: #f1f8f4; }
.ph-name { font-weight: 700; font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-preview {
  color: #8a8178;
  font-size: 0.82rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.ph-state { color: #146c43; font-size: 0.78rem; font-weight: 700; }
.ph-state:empty { display: none; }
.ph-edit {
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #a3988e;
  cursor: pointer;
}
.ph-edit:hover { background: #f4f0e9; color: var(--ink); }
.ph-form[hidden] { display: none; }
.ph-form-title { margin: 0 0 10px; font-size: 0.95rem; }
.ph-form input,
.ph-form textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  line-height: 1.55;
}
.ph-form textarea { min-height: 140px; resize: vertical; }
.ph-form input:focus,
.ph-form textarea:focus {
  outline: none;
  border-color: #8fbea6;
  box-shadow: 0 0 0 4px rgba(20, 108, 67, 0.12);
}
.ph-form .att-note { margin-top: 0; min-height: 1em; color: #b3402f; }
.ph-delete { margin-right: auto; color: #b3402f; }
.ph-delete[hidden] { display: none; }

@media (max-width: 800px) {
  .widget-grip { display: none; }
  .widget-resize { display: none; }
  .widget-bar { cursor: default; touch-action: auto; }
  .now-line { gap: 8px; }
  .now-line span { font-size: 0.78rem; }
  .now-line time { font-size: 0.95rem; }
  .topbar { padding: 10px 16px; }
  .desk-chrome .topbar { flex-wrap: wrap; gap: 6px; align-items: flex-start; }
  .desk-chrome .now-line { justify-content: flex-start; }
  .desk-chrome .top-links { flex-wrap: wrap; justify-content: flex-start; }
  body.is-board-edit .top-left { flex: 1 1 100%; }
  body.is-board-edit .home-hint { white-space: normal; }
  .home {
    --row: 92px;
    padding: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: var(--row);
  }
  .widget { min-height: 280px; grid-column: 1 / -1; }
  .widget.is-icon { min-height: 0; grid-column: span 1; cursor: pointer; }
  .widget.is-icon .icon-open { cursor: pointer; }
  .widget.is-min { min-height: 0; height: auto; }
  .who { max-width: 120px; }
}

.widget.is-icon {
  appearance: none;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-height: 0;
  padding: 8px 6px;
  border-radius: 16px;
  color: #3d3833;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
}
.widget.is-icon { cursor: grab; }
.widget.is-icon .icon-open {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  cursor: pointer;
}
.widget.is-icon .icon-open { cursor: grab; }
.widget.is-icon .widget-remove {
  position: absolute;
  top: 6px;
  inset-inline-end: 6px;
  z-index: 2;
  width: 20px;
  height: 20px;
}
.widget.is-icon .dock-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #6f675f;
}
.widget.is-icon .dock-icon svg { width: 22px; height: 22px; }
.widget.is-icon .dock-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 100%;
}
.widget-icon svg, .tool-card .icon svg { display: block; }
.widget-icon svg { width: 16px; height: 16px; }
.tool-card .icon svg { width: 22px; height: 22px; }
.sheet-page .memo-panel { gap: 10px; }
.sheet-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.sheet-scroll {
  flex: 1;
  min-height: 220px;
  overflow: auto;
  border: 1px solid #efeae3;
  border-radius: 16px;
  background: #fffdf9;
  outline: none;
}
html.embed .sheet-page .sheet-scroll { min-height: 0; }
.sheet-table { border-collapse: separate; border-spacing: 0; min-width: 100%; }
.sheet-table th, .sheet-table td {
  border-right: 1px solid #efeae3;
  border-bottom: 1px solid #efeae3;
  font-weight: 500;
}
.sheet-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 28px;
  padding: 0 8px;
  background: #f7f3ee;
  color: #6f675f;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
}
.sheet-table th.sheet-corner, .sheet-table th.sheet-rowhead {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 36px;
  width: 36px;
  background: #f3eee7;
}
.sheet-table thead th.sheet-corner { z-index: 3; }
.sheet-table td {
  min-width: 88px;
  height: 32px;
  padding: 0 8px;
  background: #fffdf9;
  font-size: 0.92rem;
  white-space: nowrap;
  cursor: cell;
}
.sheet-table td.is-selected { background: #f6efe6; }
.sheet-table td.is-focus { box-shadow: inset 0 0 0 2px #c4b5a4; }
.sheet-table td.is-num { text-align: right; font-variant-numeric: tabular-nums; }
.sheet-table td.is-bad { color: #9a3412; text-align: center; }
.sheet-input {
  width: 100%;
  height: 30px;
  border: 0;
  padding: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  outline: none;
}
.sheet-status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  color: #6f675f;
  font-size: 0.82rem;
}
.sheet-status p { margin: 0; }

.cal-page .memo-panel { position: relative; gap: 8px; }
.cal-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cal-nav, .cal-views { display: flex; gap: 6px; }
.cal-label { margin: 0; font-size: 1.05rem; letter-spacing: -0.03em; flex: 1; min-width: 8rem; }
.cal-views button[aria-pressed='true'], .memo-new.is-solid {
  background: var(--ink);
  color: #fff;
  border-style: solid;
}
.cal-message { min-height: 1.1em; margin: 0; color: #9a3412; font-size: 0.82rem; }
.cal-board { flex: 1; min-height: 220px; overflow: auto; }
html.embed .cal-board { min-height: 0; }
.cal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: #efeae3; border-radius: 16px; overflow: hidden; }
.cal-dayhead, .cal-colhead { background: #f7f3ee; color: #6f675f; font-size: 0.72rem; text-align: center; padding: 4px 0; }
.cal-cell { background: #fffdf9; min-height: 72px; padding: 4px; cursor: cell; }
.cal-cell.is-out { background: #f6f3ee; color: #a39b93; }
.cal-cell.is-today, .cal-slot.is-today, .cal-colhead .is-today { box-shadow: inset 0 0 0 1.5px #c4b5a4; }
.cal-num { display: block; font-size: 0.75rem; color: #6f675f; }
.cal-chip { display: block; width: 100%; margin-top: 2px; border: 0; border-radius: 6px; padding: 1px 5px; text-align: left; font: inherit; font-size: 0.72rem; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-more { display: block; color: #6f675f; font-size: 0.7rem; }
.cal-columns { min-width: 640px; }
.cal-colhead, .cal-allday, .cal-hour { display: grid; grid-template-columns: 52px repeat(var(--days), minmax(0, 1fr)); }
.cal-allday { background: #fffdf9; border-bottom: 1px solid #efeae3; }
.cal-allday > div, .cal-slot { min-height: 28px; padding: 2px; border-left: 1px solid #f3eee7; }
.cal-hour-label, .cal-allday > div:first-child { color: #8a8178; font-size: 0.7rem; padding: 4px; }
.cal-slot { background: #fffdf9; min-height: 36px; cursor: cell; }
.cal-chip.is-sage { background: #e7f0ea; color: #1f4d38; }
.cal-chip.is-clay { background: #f8ebe4; color: #9a3412; }
.cal-chip.is-sea { background: #e7f0f5; color: #1e4d6b; }
.cal-chip.is-gold { background: #f8f1e4; color: #8a5a12; }
.cal-chip.is-rose { background: #f8e8ee; color: #8d3b55; }
.cal-chip.is-ink { background: #f1eeea; color: #44403c; }
.cal-dialog { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 12px; }
.cal-dialog[hidden] { display: none !important; }
.cal-backdrop { position: absolute; inset: 0; border: 0; background: rgba(28, 25, 23, 0.28); }
.cal-card { position: relative; width: min(380px, 100%); background: #fffdf9; border-radius: 18px; padding: 14px; box-shadow: var(--shadow); display: grid; gap: 10px; }
.cal-card h3, .cal-card h4 { margin: 8px 0 0; font-size: 0.95rem; }
.cal-title, .cal-share-form input, .cal-card select { width: 100%; border: 1px solid #efeae3; border-radius: 12px; background: #fff; padding: 8px 10px; font: inherit; }
.cal-times { display: grid; gap: 8px; }
.cal-times label, .cal-line { display: flex; align-items: center; gap: 8px; color: #5c564e; font-size: 0.85rem; }
.cal-times input { border: 1px solid #efeae3; border-radius: 10px; background: #fff; padding: 6px 8px; font: inherit; }
.cal-swatches { display: flex; gap: 8px; }
.cal-swatch { width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent; padding: 0; cursor: pointer; }
.cal-swatch[aria-pressed='true'] { border-color: #1c1917; }
.cal-swatch.is-sage { background: #3d6b56; }
.cal-swatch.is-clay { background: #9a3412; }
.cal-swatch.is-sea { background: #1e4d6b; }
.cal-swatch.is-gold { background: #8a5a12; }
.cal-swatch.is-rose { background: #8d3b55; }
.cal-swatch.is-ink { background: #44403c; }
.cal-actions { display: flex; justify-content: flex-end; gap: 10px; align-items: center; }
.cal-share-form { display: flex; gap: 8px; }
.cal-share-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; font-size: 0.85rem; }

.cal-chip { cursor: grab; touch-action: none; user-select: none; }
.cal-chip.is-dragging { opacity: 0.35; }
.cal-cell.is-drop, .cal-slot.is-drop, .cal-allday-cell.is-drop { background: #f3ece3; }
.cal-ghost { position: fixed; z-index: 30; pointer-events: none; max-width: 180px; border-radius: 6px; padding: 2px 6px; font-size: 0.72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 8px 18px rgba(28, 25, 23, 0.12); }
.cal-ghost.is-sage { background: #e7f0ea; color: #1f4d38; }
.cal-ghost.is-clay { background: #f8ebe4; color: #9a3412; }
.cal-ghost.is-sea { background: #e7f0f5; color: #1e4d6b; }
.cal-ghost.is-gold { background: #f8f1e4; color: #8a5a12; }
.cal-ghost.is-rose { background: #f8e8ee; color: #8d3b55; }
.cal-ghost.is-ink { background: #f1eeea; color: #44403c; }

.auth-form [hidden] { display: none !important; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; margin-top: 16px; }
.auth-links button { border: 0; background: none; padding: 0; color: #3d6b56; font: inherit; font-size: 0.92rem; cursor: pointer; }
.auth-links button:hover { text-decoration: underline; }
.auth-code input { letter-spacing: 0.28em; font-size: 1.15rem; }
.ask-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; font-weight: 700; }
.ask-field input { font: inherit; font-weight: 500; border: 1px solid #efeae3; border-radius: 12px; background: #fff; padding: 8px 10px; }

.top-links [hidden] { display: none !important; }
.admin-tools { display: flex; gap: 14px; margin-top: 8px; }
.admin-list { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; }
.admin-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #efeae3;
  border-radius: 14px;
  background: #fff;
}
.admin-row input { width: 18px; height: 18px; accent-color: #146c43; }
.admin-mail { font-weight: 700; }
.admin-when { margin-left: auto; color: #8a8178; font-size: 0.92rem; }
.admin-self { color: #8a8178; font-size: 0.88rem; }
.admin-chosen { margin: 0 0 14px; padding-left: 18px; }
.admin-chosen li { margin: 4px 0; }

#bg-open { display: inline; }
.widget-bg {
  display: inline;
  border: 0;
  background: transparent;
  color: #5c564e;
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}
.widget-bg:hover { color: #1c1917; }
.widget.has-bg iframe { background: transparent; }
.bg-card { width: min(460px, 100%); }
.bg-swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.bg-swatch {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #e6dfd6;
  border-radius: 50%;
  cursor: pointer;
}
.bg-swatch[aria-pressed="true"] { outline: 2px solid #146c43; outline-offset: 2px; }
.bg-color {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  font-weight: 700;
}
.bg-color input { width: 44px; height: 32px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.bg-file-row { margin-bottom: 8px; }
html.embed.has-surface .panel,
html.embed.has-surface .memo-panel {
  background: transparent;
  box-shadow: none;
}

html.is-film,
html.is-film body {
  margin: 0;
  height: 100%;
  background: #111;
  overflow: hidden;
}
html.is-film .yt-stage {
  position: fixed;
  inset: 0;
  background: #000;
}
html.is-film .yt-stage iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}
html.is-film .yt-setup {
  position: fixed;
  z-index: 4;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: min(640px, calc(100% - 24px));
}
html.is-film .yt-setup .aid-setup-body {
  padding: 16px;
  border: 1px solid #e6dfd6;
  border-radius: 18px;
  background: #fffdf9;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}
html.is-film .yt-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
html.is-film .yt-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 700;
  color: #3d3833;
}
html.is-film .yt-form input {
  width: 100%;
  min-height: 52px;
  padding: 8px 14px;
  border: 1px solid #e6dfd6;
  border-radius: 12px;
  background: #fff;
  color: #3d3833;
  font: inherit;
  font-size: 1.05rem;
}
html.is-film .yt-form .primary { min-height: 52px; }
html.is-film .yt-setup .yt-panel {
  max-height: calc(100vh / var(--hp-zoom, 1) - 72px);
  overflow: auto;
  overscroll-behavior: contain;
}
html.is-film .yt-form .message { min-height: 1.2em; margin: 0; }
html.is-film .aid-close {
  display: inline-flex;
  position: fixed;
  top: 14px;
  inset-inline-end: 16px;
  z-index: 5;
}

.memo-record .memo-panel {
  background:
    radial-gradient(160px 90px at 100% 0%, rgba(232, 220, 196, 0.45), transparent 70%),
    linear-gradient(180deg, #fbfaf7, #fffdf9);
  border-radius: 28px;
}
.memo-record .rec-sort {
  margin: 0 0 8px;
  text-align: end;
  color: #8a8178;
  font-size: 0.78rem;
  font-weight: 700;
}
.memo-record .rec-board {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.memo-record .rec-head,
.memo-record .rec-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) minmax(88px, 132px) 132px 22px;
  gap: 8px;
  align-items: start;
}
.memo-record .rec-head {
  padding: 0 0 6px;
  color: #5c564e;
  font-size: 0.78rem;
  font-weight: 700;
}
.memo-record .rec-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 8px;
}
.memo-record .rec-tick {
  width: 22px;
  height: 22px;
  margin-top: 9px;
  padding: 0;
  border-radius: 6px;
  border: 1.5px solid #cfc6bc;
  background: #fff center / 12px 12px no-repeat;
  cursor: pointer;
}
.memo-record .rec-row.is-done .rec-tick {
  border-color: #146c43;
  background-color: #146c43;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.2 4.6 9 10 3' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.memo-record .rec-main { min-width: 0; }
.memo-record .rec-title-wrap { position: relative; }
.memo-record .rec-title,
.memo-record .rec-number,
.memo-record .rec-due {
  width: 100%;
  min-height: 40px;
  margin: 0;
  padding: 8px 14px;
  border: 1px solid #d9d3cb;
  background: #fff;
  color: #2c261f;
  font: inherit;
  font-weight: 400;
}
.memo-record .rec-title {
  border-radius: 999px;
  padding-inline-end: 40px;
}
.memo-record .rec-number,
.memo-record .rec-due { border-radius: 12px; }
.memo-record .rec-row.is-done .rec-title {
  color: #b3a89e;
  text-decoration: line-through;
}
.memo-record .rec-row.is-late .rec-due { color: #9a3412; font-weight: 700; }
.memo-record .rec-clip {
  position: absolute;
  top: 50%;
  inset-inline-end: 8px;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #6b645c;
  cursor: pointer;
}
.memo-record .rec-clip svg { width: 16px; height: 16px; }
.memo-record .rec-file {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 4px 12px 0;
  min-width: 0;
}
.memo-record .rec-file[hidden] { display: none; }
.memo-record .rec-open {
  min-width: 0;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #146c43;
  font: inherit;
  font-size: 0.78rem;
  text-align: start;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.memo-record .rec-clear,
.memo-record .rec-x {
  border: 0;
  background: transparent;
  color: #c2b6aa;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.memo-record .rec-x { margin-top: 8px; }
.memo-record .rec-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  align-self: flex-start;
  margin-top: 4px;
  min-height: 40px;
  padding: 6px 14px;
  border: 1px dashed #d9cfc3;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #3d3833;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.memo-record .rec-add svg { width: 16px; height: 16px; }
.memo-record .rec-add:disabled { opacity: 0.4; cursor: not-allowed; }
.memo-record .rec-clear:hover,
.memo-record .rec-x:hover { color: var(--danger); }
.memo-record .message { min-height: 1.2em; margin: 8px 0 0; }
.memo-record .memo-local { margin: 8px 0 0; }

.tool-about {
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid #ece6da;
  border-radius: 14px;
  background: #fbf9f5;
  color: #1d2420;
  line-height: 1.65;
}
.tool-about h2 { margin: 14px 0 6px; font-size: 1rem; color: #1F6B4A; }
.tool-about h2:first-child { margin-top: 0; }
.tool-about ol, .tool-about ul { margin: 0; padding-left: 1.2em; }
.tool-about p { margin: 0.4em 0; }
.tool-about .tool-note { margin: 10px 0 0; color: #5c6661; font-size: 0.92rem; }
html.embed .tool-about,
html.is-show .tool-about { display: none !important; }

.desk-intro { margin: 10px 18px 0; }
.desk-intro h1 { margin: 0 0 6px; font-size: 1.35rem; letter-spacing: -0.03em; }
.desk-intro ol { margin: 6px 0 0; }

.room-clock { text-align: center; padding: 12px 8px 8px; }
.room-time {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  font-size: clamp(2.8rem, 16cqi, 6rem);
  color: #1F6B4A;
  line-height: 1;
}
.room-date { margin: 10px 0 0; color: #5c6661; font-size: 1.05rem; }
html.embed .clock-stand { height: 100%; }
html.embed .clock-stand .panel { min-height: 0; }
html.embed .clock-stand .room-clock {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.tt-wrap { overflow: auto; }
.tt-grid { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.tt-grid th, .tt-grid td { border: 1px solid #efeae3; padding: 2px 4px; text-align: center; vertical-align: middle; }
.tt-grid thead th { background: #eef5f1; color: #1F6B4A; font-weight: 700; }
.tt-grid tbody th { background: #fbf9f5; color: #5c6661; font-weight: 600; white-space: nowrap; }
.tt-grid tbody th strong { display: block; color: #1d2420; }
.tt-grid tbody th span { display: block; font-size: 0.75rem; font-weight: 500; }
.tt-grid input {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: center;
  font: inherit;
  padding: 8px 2px;
  color: inherit;
}
.tt-grid td.is-now { background: #1F6B4A; }
.tt-grid td.is-now input { color: #fff; }
.tt-grid tr.is-now th { background: #e7f3ec; }
html.embed .timetable-page { height: 100%; margin: 0; padding: 8px 10px 12px; display: flex; }
html.embed .timetable-page .panel { flex: 1; margin: 0; min-height: 0; display: flex; flex-direction: column; }
html.embed .timetable-page h1,
html.embed .timetable-page .lead { display: none; }
html.embed .timetable-page .tt-wrap { flex: 1; }

html.embed .tool-guide-link,
html.is-show .tool-guide-link { display: none !important; }
.tool-guide-link { margin: 8px 0 12px; }
.tool-guide-link a { color: #1F6B4A; font-weight: 700; }
html.is-show.is-frame .aid-close { display: none !important; }
html.yt-root #yt-close { display: none !important; }
/* video: paused cover + history */
.yt-actions { display: flex; gap: 8px; }
.yt-actions .primary { flex: 1 1 auto; }
.yt-history-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; padding: 6px 16px;
  border: 1px solid #e6dfd6; border-radius: 12px;
  background: #fff; color: #3d3833; font: inherit; font-weight: 700; cursor: pointer;
}
html.is-film .yt-history-toggle { min-height: 52px; }
.yt-history-toggle svg { width: 20px; height: 20px; flex: none; }
.yt-history-toggle.is-on { background: #eef6f1; border-color: #1F6B4A; color: #1F6B4A; }
.yt-history[hidden], .yt-facade[hidden], .yt-history-clear[hidden], .yt-history-empty[hidden] { display: none !important; }
.yt-history { margin-top: 12px; border-top: 1px solid #eee6da; padding-top: 10px; }
.yt-history-empty { margin: 4px 0; color: #8a8178; font-size: 0.95rem; }
.yt-history-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.yt-history-item { display: flex; align-items: center; gap: 4px; border-radius: 12px; }
.yt-history-item.is-current { background: #f3efe8; }
.yt-history-open {
  flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px;
  padding: 6px; border: 0; border-radius: 12px; background: transparent;
  color: #3d3833; font: inherit; text-align: start; cursor: pointer;
}
.yt-history-open:hover, .yt-history-open:focus-visible { background: #f6f1ea; }
.yt-history-open img { width: 80px; height: 45px; flex: none; object-fit: cover; border-radius: 8px; background: #ddd5ca; }
.yt-history-words { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.yt-history-title { font-weight: 700; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.yt-history-url { color: #8a8178; font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yt-history-act {
  flex: none; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 10px; background: transparent; color: #6f665d; cursor: pointer;
}
.yt-history-act:hover, .yt-history-act:focus-visible { background: #efe8de; color: #3d3833; }
.yt-history-act svg { width: 18px; height: 18px; }
.yt-history-edit {
  flex: 1 1 auto; min-width: 0; min-height: 44px; padding: 6px 10px;
  border: 1px solid #1F6B4A; border-radius: 10px; font: inherit; color: #3d3833; background: #fff;
}
.yt-history-clear {
  margin-top: 10px; padding: 6px 12px; border: 1px solid #e6dfd6; border-radius: 999px;
  background: #fff; color: #9a3b2e; font: inherit; font-size: 0.9rem; font-weight: 700; cursor: pointer;
}
.yt-facade {
  position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0;
  display: flex; align-items: center; justify-content: center;
  background: #000; color: #fff; font: inherit; cursor: pointer; overflow: hidden;
}
.yt-facade img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.yt-facade::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,0.7)); pointer-events: none; }
.yt-facade-play { position: relative; z-index: 1; width: clamp(56px, 14vmin, 112px); transition: transform 0.15s ease; filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4)); }
.yt-facade-play svg { display: block; width: 100%; height: auto; }
.yt-facade:hover .yt-facade-play, .yt-facade:focus-visible .yt-facade-play { transform: scale(1.08); }
.yt-facade-text {
  position: absolute; z-index: 1; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column; gap: 2px; padding: clamp(10px, 3vmin, 24px);
  text-align: start;
}
.yt-facade-title { font-weight: 700; font-size: clamp(0.95rem, 3.2vmin, 1.6rem); line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; text-shadow: 0 1px 4px rgba(0,0,0,0.6); }
.yt-facade-hint { opacity: 0.85; font-size: clamp(0.8rem, 2.4vmin, 1.05rem); }
html.embed.yt-root .tool-main,
html.embed.yt-root .topbar { display: none !important; }
html.yt-root:not(.is-film) .yt-stage {
  position: relative;
  height: min(70vh, 720px);
  min-height: 240px;
  background: #111;
  border-radius: 16px;
  overflow: hidden;
}
html.yt-root:not(.is-film) .yt-stage iframe { width: 100%; height: 100%; border: 0; }
html.yt-root:not(.is-film) .yt-setup { position: relative; max-width: 720px; margin: 0 auto 16px; }
html.yt-root:not(.is-film) .yt-form { display: flex; flex-direction: column; gap: 10px; }
html.yt-root:not(.is-film) .yt-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; }
html.yt-root:not(.is-film) .yt-form input {
  width: 100%;
  min-height: 48px;
  padding: 8px 14px;
  border: 1px solid #e6dfd6;
  border-radius: 12px;
  font: inherit;
}

.tool-live {
  width: 100%;
  height: min(78vh, 920px);
  min-height: 560px;
  border: 1px solid #ece6da;
  border-radius: 16px;
  background: #f6f3ee;
}

/* ---- Dashboard v2: Windows-style board, taskbar, start menu, snap, presentation ---- */
body.desk { --taskbar-h: 48px; --dash-green: #1F6B4A; padding-bottom: var(--taskbar-h); }
body.desk .home { min-height: calc(100vh - var(--bar) - var(--taskbar-h)); padding-bottom: 18px; }
body.desk .desk-intro { margin: 8px 18px 24px; color: #5c564e; font-size: 0.92rem; }
body.desk .desk-intro h1 { font-size: 1.1rem; }
body.desk .desk-intro details { margin-top: 6px; }
body.desk .desk-intro summary { cursor: pointer; font-weight: 700; color: var(--dash-green); }
body.desk .desk-chrome .home-actions .primary { background: var(--dash-green); }

/* Minimized widgets live on the taskbar, not on the board. */
.widget.is-min { display: none !important; }

.widget { outline: none; }
.widget.is-active:not(.is-icon) { border-color: #b9d3c5; box-shadow: 0 0 0 1px rgba(31, 107, 74, 0.18), var(--shadow); }
.widget.is-active:not(.is-icon) .widget-bar { background: #f3f8f5; }
.widget.is-flash { animation: dash-flash 0.9s ease-out 1; }
@keyframes dash-flash { 0% { box-shadow: 0 0 0 4px rgba(31, 107, 74, 0.45); } 100% { box-shadow: 0 0 0 0 rgba(31, 107, 74, 0); } }

/* Maximize fills the screen above the taskbar. */
.widget.is-cover { inset: 0 0 var(--taskbar-h) 0; z-index: 40; }
body.is-present .widget.is-cover { inset: 0; }

/* Resize from every edge and corner. */
.widget-edge { position: absolute; z-index: 4; touch-action: none; }
.widget-edge.edge-n { top: 0; left: 14px; right: 14px; height: 5px; cursor: ns-resize; }
.widget-edge.edge-s { bottom: 0; left: 14px; right: 14px; height: 7px; cursor: ns-resize; }
.widget-edge.edge-e { top: 14px; bottom: 14px; right: 0; width: 7px; cursor: ew-resize; }
.widget-edge.edge-w { top: 14px; bottom: 14px; left: 0; width: 7px; cursor: ew-resize; }
.widget-edge.edge-ne, .widget-edge.edge-nw, .widget-edge.edge-se, .widget-edge.edge-sw { width: 14px; height: 14px; }
.widget-edge.edge-ne { top: 0; right: 0; cursor: nesw-resize; }
.widget-edge.edge-nw { top: 0; left: 0; cursor: nwse-resize; }
.widget-edge.edge-se { bottom: 0; right: 0; cursor: nwse-resize; }
.widget-edge.edge-sw { bottom: 0; left: 0; cursor: nesw-resize; }
.widget.is-cover .widget-edge,
.widget:fullscreen .widget-edge,
body.is-present .widget-edge,
body.is-present .widget-resize { display: none; }

/* Snap preview overlay */
.snap-preview {
  position: fixed;
  z-index: 35;
  border-radius: 22px;
  border: 2px solid rgba(31, 107, 74, 0.55);
  background: rgba(31, 107, 74, 0.12);
  backdrop-filter: blur(2px);
  pointer-events: none;
  transition: left 0.12s, top 0.12s, width 0.12s, height 0.12s;
}
.snap-preview[hidden] { display: none; }

/* Taskbar */
.taskbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--taskbar-h);
  padding: 6px 10px;
  background: rgba(255, 253, 249, 0.96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(12px);
  box-shadow: 0 -6px 18px rgba(28, 25, 23, 0.05);
}
.start-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px 0 10px;
  border: 0;
  border-radius: 10px;
  background: var(--dash-green);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  flex: 0 0 auto;
}
.start-btn:hover, .start-btn[aria-expanded="true"] { background: #185a3d; }
.start-logo { display: grid; grid-template-columns: 7px 7px; gap: 2px; }
.start-logo i { width: 7px; height: 7px; border-radius: 1.5px; background: rgba(255, 255, 255, 0.92); }
.task-list { display: flex; align-items: center; gap: 6px; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.task-list::-webkit-scrollbar { display: none; }
.task-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 170px;
  height: 36px;
  padding: 0 12px 0 9px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #3d3833;
  font: inherit;
  font-size: 0.84rem;
  cursor: pointer;
  flex: 0 0 auto;
}
.task-btn:hover { background: #f1ece5; }
.task-btn::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 16px;
  height: 3px;
  border-radius: 3px;
  background: #b7aea4;
  transform: translateX(-50%);
}
.task-btn.is-active { background: #eaf3ee; border-color: #cfe2d7; }
.task-btn.is-active::after { width: 22px; background: var(--dash-green); }
.task-btn.is-min { color: #8a8178; }
.task-btn.is-min::after { width: 6px; background: #cfc6bb; }
.task-icon { display: grid; place-items: center; width: 20px; height: 20px; color: #6f675f; flex: 0 0 auto; }
.task-icon svg { width: 18px; height: 18px; }
.task-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-tray { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.tray-btn {
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: #3d3833;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}
.tray-btn:hover, .tray-btn[aria-expanded="true"] { border-color: #b9d3c5; color: var(--dash-green); }

/* Start menu */
.start-sheet .catalog-backdrop { background: rgba(28, 25, 23, 0.12); }
.start-sheet .start-panel {
  top: auto;
  right: auto;
  left: 10px;
  bottom: calc(var(--taskbar-h) + 8px);
  width: min(560px, calc(100% - 20px));
  max-height: min(640px, calc(100vh - var(--taskbar-h) - 24px));
  border: 1px solid #e6dfd6;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(28, 25, 23, 0.22);
  background: rgba(255, 253, 249, 0.98);
}
.start-panel .catalog { width: auto; margin: 0; padding: 4px 18px 14px; }
.start-panel .catalog-head h2 { margin-top: 14px; font-size: 1.15rem; }
.start-groups h3 { margin: 14px 0 8px; font-size: 0.8rem; color: #8a8178; letter-spacing: 0; }
.start-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.start-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-height: 84px;
  padding: 10px 4px 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #3d3833;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
}
.start-item:hover, .start-item:focus-visible { background: #f1ece5; border-color: #e6dfd6; }
.start-item:disabled { opacity: 0.45; cursor: default; }
.start-item[hidden] { display: none; }
.start-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #fff; box-shadow: 0 1px 0 #e6dfd1; color: #3d3833; }
.start-icon svg { width: 20px; height: 20px; }
.start-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.start-state { min-height: 1em; font-size: 0.68rem; color: var(--dash-green); font-weight: 700; }
.start-none { color: #8a8178; }
.start-foot { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding-top: 10px; border-top: 1px solid #efe8de; font-size: 0.84rem; }
.start-foot a { color: var(--dash-green); font-weight: 600; }

/* Saved layouts popover */
.layouts-pop {
  position: fixed;
  right: 10px;
  bottom: calc(var(--taskbar-h) + 8px);
  z-index: 46;
  width: min(360px, calc(100% - 20px));
  padding: 16px 16px 12px;
  border: 1px solid #e6dfd6;
  border-radius: 18px;
  background: #fffdf9;
  box-shadow: 0 24px 60px rgba(28, 25, 23, 0.2);
}
.layouts-pop[hidden] { display: none; }
.layouts-pop h2 { margin: 0 0 6px; font-size: 1.05rem; }
.layout-form { display: flex; gap: 8px; }
.layout-form .search-input { flex: 1; min-width: 0; }
.layout-form .primary { padding: 8px 14px; border-radius: 10px; background: var(--dash-green); }
.layout-quick-row { display: flex; gap: 10px; margin: 6px 0 0; font-size: 0.82rem; }
.layouts-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.layout-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid #efeae3; border-radius: 12px; background: #fff; }
.layout-name { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.layout-count { color: #8a8178; font-size: 0.78rem; }
.layout-delete { color: #b3402f; }
.layouts-empty { margin: 10px 0 0; color: #8a8178; font-size: 0.86rem; }
.layouts-empty[hidden] { display: none; }

/* Right-click menu */
.ctx-menu {
  position: fixed;
  z-index: 60;
  min-width: 210px;
  padding: 6px;
  border: 1px solid #e6dfd6;
  border-radius: 12px;
  background: #fffdf9;
  box-shadow: 0 16px 40px rgba(28, 25, 23, 0.2);
}
.ctx-menu[hidden] { display: none; }
.ctx-menu hr { margin: 4px 6px; border: 0; border-top: 1px solid #efe8de; }
.ctx-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #1c1917;
  font: inherit;
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
}
.ctx-item:hover:not(:disabled), .ctx-item:focus-visible { background: #eaf3ee; outline: none; }
.ctx-item:disabled { color: #b7aea4; cursor: default; }
.ctx-item kbd { font: inherit; font-size: 0.74rem; color: #8a8178; }
.ctx-item.is-danger:hover:not(:disabled) { background: #fbeae7; color: #9a2f22; }

/* Undo toast */
.dash-toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--taskbar-h) + 14px);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100% - 24px);
  padding: 10px 10px 10px 16px;
  border-radius: 14px;
  background: #23302a;
  color: #fff;
  font-size: 0.9rem;
  box-shadow: 0 14px 34px rgba(28, 25, 23, 0.28);
  transform: translateX(-50%);
}
.dash-toast[hidden] { display: none; }
.toast-undo { border: 0; border-radius: 9px; padding: 7px 12px; background: #e8f5ee; color: var(--dash-green); font: inherit; font-weight: 700; cursor: pointer; }
.toast-undo[hidden] { display: none; }
.toast-close { border: 0; background: transparent; color: #cfd8d3; font-size: 1.2rem; cursor: pointer; padding: 0 6px; }

/* First-visit tip */
.desk-tip {
  position: fixed;
  right: 14px;
  bottom: calc(var(--taskbar-h) + 14px);
  z-index: 44;
  width: min(330px, calc(100% - 28px));
  padding: 16px 16px 14px;
  border: 1px solid #cfe2d7;
  border-radius: 18px;
  background: #fffdf9;
  box-shadow: 0 18px 44px rgba(28, 25, 23, 0.18);
}
.desk-tip[hidden] { display: none; }
.desk-tip h2 { margin: 0 0 8px; font-size: 1rem; color: var(--dash-green); }
.desk-tip ul { margin: 0 0 12px; padding-left: 18px; color: #3d3833; font-size: 0.86rem; line-height: 1.55; }
.desk-tip .primary { padding: 8px 16px; border-radius: 10px; background: var(--dash-green); }

/* Classroom presentation mode */
.present-exit { display: none; }
body.is-present { padding-bottom: 0; background: #f3efe8; }
body.is-present .desk-chrome,
body.is-present .taskbar,
body.is-present .desk-intro,
body.is-present .desk-tip,
body.is-present .widget-bg,
body.is-present .widget-grip { display: none !important; }
body.is-present .home { min-height: 100vh; padding: 14px 18px; }
body.is-present .widget-bar { min-height: 52px; }
body.is-present .widget-name { font-size: 1.25rem; }
body.is-present .present-exit {
  display: block;
  position: fixed;
  top: 10px;
  right: 12px;
  z-index: 55;
  padding: 8px 14px;
  border: 1px solid rgba(230, 221, 212, 0.95);
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.92);
  color: #3d3833;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  opacity: 0.35;
  transition: opacity 0.2s;
}
body.is-present .present-exit:hover, body.is-present .present-exit:focus-visible { opacity: 1; }

@media (max-width: 1100px) {
  .task-btn { max-width: 120px; }

}
@media (max-width: 800px) {
  .widget-edge { display: none; }
  .task-name { display: none; }
  .task-btn { padding: 0 8px; }
  .start-btn span:last-child { display: none; }
  .start-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .desk-tip { display: none !important; }
}

/* Tool pages: 대시보드에 추가 */
.dash-add {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 10px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #1F6B4A;
  color: #fff !important;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none !important;
  vertical-align: middle;
}
.dash-add:hover { background: #185a3d; }
a.back + .dash-add { margin: 0 0 12px 10px; }

/* Widget content zoom (− 100% +) */
.widget:not(.is-icon) { container-type: inline-size; container-name: widget; }
.widget-zoom { display: flex; align-items: center; gap: 1px; flex: 0 0 auto; padding: 1px; border: 1px solid #e6ddd4; border-radius: 999px; background: #fff; }
.widget-zoom button { display: grid; place-items: center; height: 20px; padding: 0; border: 0; border-radius: 999px; background: transparent; color: #5c564e; font: inherit; font-weight: 700; line-height: 1; cursor: pointer; }
.widget-zoom .zoom-btn { width: 20px; font-size: 0.95rem; }
.widget-zoom .zoom-pct { min-width: 38px; padding: 0 3px; font-size: 0.72rem; font-variant-numeric: tabular-nums; }
.widget-zoom button:hover:not(:disabled) { background: #eaf3ee; color: #1F6B4A; }
.widget-zoom button:disabled { color: #cfc6bb; cursor: default; }
.widget.is-zoomed .zoom-pct { color: #1F6B4A; }
body.is-present .widget-zoom { transform: scale(1.15); }
@container widget (max-width: 360px) { .widget-bg { display: none; } }
@container widget (max-width: 270px) { .widget-zoom { display: none; } }
/* Clock widget: grow with content zoom but never wider than its window. */
html.embed .clock-stand .room-time { font-size: min(6rem, calc(19cqi / var(--hp-zoom, 1))); }
/* 수업 보조 도구: 결과 보여주기(경기 애니메이션) 고르기 */
.aid-theme { display: flex; flex-direction: column; gap: 6px; width: min(100%, 640px); margin: 0 auto 8px; font-size: 0.78rem; font-weight: 700; color: #8a8178; }
.aid-theme-opts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.aid-theme-opts button { min-height: 38px; padding: 6px 4px; border: 1px solid #e6dfd6; border-radius: 12px; background: #fffdf9; color: #3d3833; font: inherit; font-size: 0.9rem; font-weight: 700; cursor: pointer; }
.aid-theme-opts button.is-on { background: #e8f5ee; border-color: #146c43; color: #146c43; box-shadow: inset 0 0 0 1px #146c43; }
.aid-length-title { margin-top: 2px; }
.aid-length-opts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
html[data-aid-theme="none"] .aid-length-title,
html[data-aid-theme="none"] .aid-length-opts { display: none; }
html.is-show .aid-theme { font-size: 1.05rem; color: #3d3833; }
html.is-show .aid-theme-opts button { min-height: 52px; font-size: 1.15rem; }
.aid-view.is-race .ladder-board { display: none; }
.aid-view.is-race .pair-list { flex: 1; align-content: start; }
html:not([data-aid-theme="none"]) #ladder-one { display: none; }
html:not([data-aid-theme="none"]) [data-view="ladder"] .aid-go #ladder-all { grid-column: 1 / -1; }
.aid-view.is-race .ladder-stage { overflow: auto; }
.aid-view.is-race .pair-list { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.aid-view.is-race .pair-list li span { word-break: keep-all; }

/* 수업 보조 도구: 경기 시작 전 설정 화면 (학생 수·이름·경기 종목) */
.aid-view[data-view="ladder"] .aid-setup-body,
.aid-view[data-view="pick"] .aid-setup-body,
.aid-view[data-view="groups"] .aid-setup-body {
  width: min(100%, 840px);
  margin: 0 auto;
  padding: 14px 16px 16px;
  background: #fff;
  border: 2px solid #e6dfd6;
  border-radius: 28px;
  box-shadow: 0 10px 28px rgba(28, 25, 23, 0.07);
  box-sizing: border-box;
}
.aid-view[data-view="ladder"] .aid-theme,
.aid-view[data-view="pick"] .aid-theme,
.aid-view[data-view="groups"] .aid-theme {
  width: 100%;
  margin: 0 0 12px;
  gap: 6px;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}
.aid-kicker {
  display: block;
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
  color: #6f675f;
  letter-spacing: -0.02em;
}
.aid-style-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.aid-style-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 8px 6px 10px;
  border: 2px solid #e6dfd6;
  border-radius: 20px;
  background: #fffdf9;
  color: #1c1917;
  font: inherit;
  cursor: pointer;
  box-shadow: 0 2px 0 #efe8df;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.aid-style-card:hover {
  border-color: #d0c7bb;
  background: #fff;
}
.aid-style-card:focus-visible {
  outline: 3px solid #146c43;
  outline-offset: 2px;
}
.aid-style-card.is-on {
  border-color: #146c43;
  background: #e8f5ee;
  box-shadow: 0 3px 0 #146c43;
  transform: translateY(-1px);
}
.aid-style-art {
  display: block;
  width: 100%;
  line-height: 0;
}
.aid-style-art svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 64px;
}
.aid-style-name {
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  text-align: center;
  word-break: keep-all;
}
.aid-style-card.is-on .aid-style-name { color: #146c43; }
.aid-length-pill {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  background: #f6f3ee;
  border: 2px solid #e6dfd6;
  border-radius: 999px;
}
.aid-length-pill button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-height: 52px;
  padding: 6px 4px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #3d3833;
  font: inherit;
  font-weight: 800;
  line-height: 1.15;
  cursor: pointer;
}
.aid-length-pill button strong { font-size: 1.05rem; font-weight: 900; }
.aid-length-pill button small {
  font-size: 0.78rem;
  font-weight: 700;
  color: #8a8178;
}
.aid-length-pill button.is-on {
  background: #146c43;
  color: #fff;
  box-shadow: 0 2px 0 #0f5a38;
}
.aid-length-pill button.is-on small { color: #d8f3dc; }
.aid-length-pill button:focus-visible {
  outline: 3px solid #146c43;
  outline-offset: 2px;
}
html[data-aid-theme="none"] .aid-length-pill { display: none; }

.aid-roster-fields {
  width: 100%;
  gap: 10px;
}
.aid-step-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}
.aid-stepper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: #fffdf9;
  border: 2px solid #e6dfd6;
  border-radius: 999px;
  box-shadow: inset 0 1px 0 #fff;
}
.aid-step {
  width: 48px;
  height: 48px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #146c43;
  color: #fff;
  font: inherit;
  font-size: 1.7rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}
.aid-step:hover:not(:disabled) { background: #0f5a38; }
.aid-step:disabled {
  background: #efe8df;
  color: #8a8178;
  cursor: not-allowed;
}
.aid-step:focus-visible,
.aid-stepper input:focus-visible {
  outline: 3px solid #146c43;
  outline-offset: 2px;
}
.aid-stepper input {
  width: 4.2rem;
  min-height: 48px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: center;
  font: inherit;
  font-size: 1.7rem;
  font-weight: 900;
  color: #1c1917;
  appearance: textfield;
  -moz-appearance: textfield;
}
.aid-stepper input::-webkit-outer-spin-button,
.aid-stepper input::-webkit-inner-spin-button { appearance: none; margin: 0; }

.aid-avatars {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 8px;
  min-height: 36px;
  padding: 0 0 2px;
}
.aid-buddy {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 22px;
  filter: drop-shadow(0 1px 0 rgba(28, 25, 23, 0.15));
}
.aid-buddy i {
  display: block;
  box-sizing: border-box;
}
.aid-buddy .aid-buddy-head {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--skin, #f6d1b0);
  border: 1.5px solid #1c1917;
  z-index: 1;
}
.aid-buddy .aid-buddy-body {
  width: 16px;
  height: 15px;
  margin-top: -3px;
  border-radius: 5px 5px 4px 4px;
  background: var(--c, #e8453c);
  border: 1.5px solid #1c1917;
}

.aid-kids { display: grid; gap: 8px; }
.aid-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: min(280px, 42vh);
  overflow: auto;
  padding: 10px;
  background: #fffdf9;
  border: 2px solid #e6dfd6;
  border-radius: 22px;
}
.aid-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 3px 6px 3px 3px;
  border: 2px solid var(--c, #e6dfd6);
  border-radius: 999px;
  background: color-mix(in srgb, var(--c, #e6dfd6) 18%, #fff);
}
.aid-chip-ava {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  background: var(--c, #146c43);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}
.aid-chip-input {
  width: 6.5em;
  min-width: 4em;
  max-width: 12em;
  min-height: 32px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: #1c1917;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.aid-chip-input:focus { outline: none; }
.aid-chip:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--c, #146c43) 35%, #fff); }
.aid-chip-x {
  width: 28px;
  height: 28px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #5c564e;
  font: inherit;
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}
.aid-chip-x:hover:not(:disabled) { background: #fff; color: #1c1917; }
.aid-chip-x:disabled { opacity: 0.3; cursor: not-allowed; }
.aid-chip-add {
  border-style: dashed;
  border-color: #d9cfc3;
  background: #fff;
  flex: 1 1 10rem;
  min-width: 10rem;
}
.aid-chip-add .aid-chip-input {
  width: 100%;
  max-width: none;
  min-height: 36px;
  font-weight: 700;
}
.aid-seat-chips .aid-chip {
  --c: #146c43;
  background: #e8f5ee;
}
.aid-seat-chips .aid-chip-ava { background: #146c43; }
.aid-roster-fields .aid-hint {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: #8a8178;
  line-height: 1.4;
}
.aid-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.aid-kids { position: relative; }

.aid-view[data-view="ladder"] .aid-go,
.aid-view[data-view="pick"] .aid-go,
.aid-view[data-view="groups"] .aid-go {
  width: min(100%, 840px);
}
.aid-view[data-view="ladder"] .aid-go #ladder-all,
.aid-view[data-view="pick"] .aid-go #pick-everyone,
.aid-view[data-view="groups"] .aid-go #group-all,
.aid-view[data-view="ladder"] .aid-go #ladder-one,
.aid-view[data-view="pick"] .aid-go #pick-draw,
.aid-view[data-view="groups"] .aid-go #group-one,
.aid-view[data-view="ladder"] .aid-go #ladder-again,
.aid-view[data-view="pick"] .aid-go #pick-again,
.aid-view[data-view="groups"] .aid-go #group-again {
  min-height: 68px;
  border-radius: 22px;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}
.aid-view[data-view="ladder"] .aid-go #ladder-all,
.aid-view[data-view="pick"] .aid-go #pick-everyone,
.aid-view[data-view="groups"] .aid-go #group-all,
.aid-view[data-view="ladder"] .aid-go #ladder-again,
.aid-view[data-view="pick"] .aid-go #pick-again,
.aid-view[data-view="groups"] .aid-go #group-again {
  background: #146c43;
  border: 0;
  color: #fff;
  box-shadow: 0 5px 0 #0f5a38;
}
.aid-view[data-view="ladder"] .aid-go #ladder-all:hover,
.aid-view[data-view="pick"] .aid-go #pick-everyone:hover,
.aid-view[data-view="groups"] .aid-go #group-all:hover,
.aid-view[data-view="ladder"] .aid-go #ladder-again:hover,
.aid-view[data-view="pick"] .aid-go #pick-again:hover,
.aid-view[data-view="groups"] .aid-go #group-again:hover {
  background: #0f5a38;
}
html:not([data-aid-theme="none"]) .aid-view[data-view="ladder"] .aid-go #ladder-all,
html:not([data-aid-theme="none"]) .aid-view[data-view="pick"] .aid-go #pick-everyone,
html:not([data-aid-theme="none"]) .aid-view[data-view="groups"] .aid-go #group-all {
  min-height: 76px;
  font-size: 1.4rem;
}

@media (max-width: 720px) {
  .aid-style-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aid-style-card { padding: 8px 8px 10px; border-radius: 18px; }
  .aid-length-pill button { min-height: 48px; }
  .aid-step-row { justify-content: center; }
  .aid-step-row .aid-kicker { width: 100%; text-align: center; }
  .aid-view[data-view="ladder"] .aid-setup-body,
  .aid-view[data-view="pick"] .aid-setup-body,
  .aid-view[data-view="groups"] .aid-setup-body {
    padding: 12px 10px 14px;
    border-radius: 22px;
  }
}
@media (max-width: 420px) {
  .aid-chip-input { width: 5.2em; font-size: 1rem; }
  .aid-step { width: 44px; height: 44px; font-size: 1.5rem; }
  .aid-stepper input { min-height: 44px; font-size: 1.45rem; }
  .aid-chips { max-height: min(240px, 36vh); padding: 8px; }
}

html.is-show .aid-style-name { font-size: 1.12rem; }
html.is-show .aid-length-pill button strong { font-size: 1.15rem; }
html.is-show .aid-chip-input { font-size: 1.15rem; }

@media (prefers-reduced-motion: reduce) {
  .aid-style-card { transition: none; }
}

html[dir="rtl"] .aid-chip { padding: 3px 3px 3px 6px; }

#pick-drawn-wrap:has(#pick-drawn:empty) { display: none; }

#pick-back[hidden] { display: none !important; }
