/* Tool layer for Advent With Friends (Winter Night skin):
   colours follow the theme palette in style.css; selectors
   and layout rules are the tool contract (CHANGES.md E11). */

.awf-tool .tool-msg {
  font-weight: 800;
  min-height: 1.5em;
  margin: 14px 0 0;
  color: var(--la-accent);
}

.awf-tool .tool-msg.err {
  color: #ffb59d;
}

.la[data-theme="frost"] .awf-tool .tool-msg.err {
  color: #c22f4e;
}

.awf-tool .board-actions {
  justify-content: center;
  max-width: 780px;
  margin: 0 auto 6px;
}

.la .board-head .board-title {
  font-family: var(--la-serif);
  font-size: clamp(1.9rem,5vw,3rem);
  margin: 0;
  line-height: 1.1;
}

.awf-tool .detail-wrap {
  max-width: 780px;
  margin: 18px auto 0;
}

.awf-tool .collect-card {
  max-width: 780px;
  margin: 18px auto 40px;
}

.awf-tool .btn.danger {
  background: #c22f4e;
  color: #fff;
}

.awf-tool .btn.danger[data-confirm="1"] {
  background: #7c1d38;
  animation: wiggle 1.2s infinite;
}

.awf-tool .detail-card {
  margin-bottom: 18px;
}

.awf-tool .note-count {
  text-align: right;
  margin: 4px 0 10px;
}

.la .awf-tool .door:not(.gift) .n {
  margin-top: 0;
  margin-right: 0;
}

.awf-tool .code-strip-top {
  margin-top: 0;
  margin-bottom: 16px;
}

.awf-tool button {
  touch-action: manipulation;
}

.la .awf-tool input[type="text"], .la .awf-tool textarea {
  box-sizing: border-box!important;
  max-width: 100%;
}

.la .awf-tool .create-card>input[type="text"] {
  display: block;
  width: 100%;
}

.la .awf-tool .code-row input[type="text"] {
  width: auto;
  min-width: 0;
}

.la .awf-tool .create-card .btn {
  max-width: 100%;
}

.la .awf-tool {
  min-width: 0;
}

.awf-tool .board-shell.golden .door {
  background: linear-gradient(160deg,#ffe08a,#eec95e 55%,#b08a35);
  color: #37290f;
  box-shadow: 0 0 0 2px #f2c14e66,0 5px #00000038,0 0 14px rgba(242,193,78,.35);
}

.awf-tool .board-shell.golden .door.empty {
  background: linear-gradient(160deg,#a37f2c,#8a671f 60%,#6e5218);
  color: #fdf3d0;
  box-shadow: inset 0 0 0 2px #ffd97759,0 0 10px rgba(242,193,78,.22);
}

.awf-tool .ks-note.wrap-gold {
  background: linear-gradient(135deg,#fff6d8,#ffedb3);
  box-shadow: 0 0 0 3px #caa14f,0 6px #0003;
}

.awf-tool .ks-note.wrap-sparkle {
  background: radial-gradient(circle at 15% 20%,rgba(255,255,255,.9) 0 2px,transparent 3px),radial-gradient(circle at 80% 30%,rgba(255,255,255,.9) 0 2px,transparent 3px),radial-gradient(circle at 60% 85%,rgba(255,255,255,.9) 0 1.5px,transparent 2.5px),linear-gradient(135deg,#e6e9ff,#fff);
}

.awf-tool .ks-note.wrap-ribbon {
  background: linear-gradient(90deg,transparent 47%,rgba(209,16,90,.16) 47% 53%,transparent 53%),var(--la-door);
  box-shadow: 0 0 0 3px #d1105a,0 6px #0003;
}

.awf-tool [data-my-remaining] {
  font-weight: 800;
  margin: 8px 0 0;
}

@media print {
  .la .hero-art,.la .hero-art-m,.la .hero h1,.la .hero .lead,.la .block,.la .closing, .awf-tool [data-view="home"],.awf-tool [data-view="cal"],.awf-tool .tool-msg, .awf-tool [data-act="ks-back"] {
    display: none!important;
  }
  .la .hero {
    display: block;
    padding: 0;
  }
  .la .wrap {
    max-width: none;
    padding: 0;
  }
}

.awf-tool .story-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(7,9,26,.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.awf-tool .story-card {
  background: var(--la-panel);
  color: var(--la-text);
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0,0,0,.55);
  padding: 20px;
  width: min(430px,100%);
  max-height: 94vh;
  overflow-y: auto;
  text-align: center;
}

.awf-tool .story-card h3 {
  font-family: var(--la-serif);
  margin: 0 0 12px;
}

.awf-tool .story-img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 62vh;
  margin: 0 auto;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
}

.awf-tool .story-hint {
  margin: 12px 0 0;
}

.awf-tool .story-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}
