/* 新しい人とありがとう (10-26・welcome_ui.js): 上の知らせの欄のカード・若葉の方の「分からない事を聞く」・案内人の「いま街で」・公園の掲示・留守の間の手紙 */
/* 知らせのカードの置き場 (上の知らせの欄 #news と同じ所・街めぐりの窓が上にある時は welcome_ui.js が top をずらす) */
#wlCards {
  position: fixed; top: calc(60px + var(--bandH, 0px)); left: 50%; transform: translateX(-50%); z-index: 6;
  display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; max-width: calc(100% - 24px); width: max-content;
}
body.col #wlCards { left: calc((100% - var(--colW, 380px)) / 2); max-width: calc(100% - var(--colW, 380px) - 24px); }
#wlCards .item {
  background: rgba(255, 252, 245, 0.97); color: #1f2430; border: 2px solid #c08a0c; border-radius: 10px;
  padding: 8px 16px; font-size: 17px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25); max-width: 100%; overflow-wrap: anywhere; text-align: left; line-height: 1.5;
}
#wlCards .item.wlCard { pointer-events: auto; position: relative; padding: 10px 40px 10px 14px; min-width: min(360px, calc(100vw - 24px)); max-width: min(560px, calc(100vw - 24px)); }
#wlCards .item.wlNew, #wlCards .item.wlGot, #wlCards .item.wlHelp { border-color: #1e9a46; }
#wlCards .item.wlNewsCard { border-color: #c96a12; }
#wlCards .item.wlPlayed { border-color: #1f5f8b; }
#wlCards .item.wlHarbor { border-color: #0f3a63; }
.wlCard .wlHead { font-weight: bold; font-size: 17px; line-height: 1.5; }
.wlCard .wlX { position: absolute; top: 4px; right: 4px; min-width: 32px; min-height: 32px; border: 0; background: transparent; color: #5a6170; font-size: 16px; cursor: pointer; border-radius: 8px; }
.wlCard .wlX:hover, .wlCard .wlX:focus-visible { background: #eef2f6; outline: none; }
.wlRow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 6px; }
.wlBtn {
  font: inherit; font-weight: bold; font-size: 16px; color: #1f5f8b; background: #fff; border: 1px solid #b9c9d8; border-radius: 8px;
  min-height: 40px; padding: 2px 12px; cursor: pointer;
}
.wlBtn.main { color: #fff; background: #1f5f8b; border-color: #1f5f8b; }
.wlBtn:hover { filter: brightness(0.97); }
.wlBtn:focus-visible, .wlClap:focus-visible, .wlPill:focus-visible { outline: 3px solid #f0b400; outline-offset: 2px; }
.wlBtn:disabled { opacity: 0.55; cursor: default; }
.wlBtn.wlDanger { color: #9a2b1f; border-color: #e0b4ad; }
.wlPerson { justify-content: space-between; }
.wlName { font-weight: bold; }
.wlSmall { font-size: 14px; color: #5a6170; font-weight: normal; }
button.wlMenu { color: #1e7a3c; }
button.wlMenu.wlDanger { color: #9a2b1f; }

/* 若葉の方の「分からない事を聞く」(左上の札の下・welcome_ui.js が位置を決める・遊びの窓 (8〜) より下) */
.wlPill {
  position: fixed; left: 12px; top: 150px; z-index: 4; min-height: 40px; padding: 3px 14px;
  font: inherit; font-weight: bold; font-size: 16px; color: #0f4d24; background: #f3fbe9; border: 2px solid #1e9a46; border-radius: 999px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22); cursor: pointer;
}
.wlPill.hidden, .wlPill.wlOff { display: none; }
@media (max-width: 700px) { .wlPill { font-size: 14px; padding: 2px 10px; min-height: 36px; } }

/* 案内人の窓の「いま街で」 */
.wlNow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; padding: 6px 0; border-bottom: 1px dashed var(--line, #d6cdbb); }
.wlNow:last-child { border-bottom: 0; }
.wlNowText { font-size: 16px; line-height: 1.5; }
.wlFaq { margin-top: 6px; }

/* 公園の掲示の下の段 */
.wlPark { margin: 10px 0 12px; display: grid; gap: 10px; }
.wlSec { border-top: 1px solid var(--line, #d6cdbb); padding-top: 8px; }
.wlSec h3 { font-size: 18px; margin: 0 0 4px; }
.wlRoomName { font-weight: bold; margin: 0 0 2px; font-size: 17px; }
.wlNews { list-style: none; margin: 4px 0; padding: 0; display: grid; gap: 6px; max-height: 260px; overflow-y: auto; }
.wlNewsLi { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; border-radius: 8px; background: var(--panel, #fffcf5); border: 1px solid var(--line, #d6cdbb); }
.wlNewsLi.big { border-color: #e2a35a; }
.wlNewsText { font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.wlClap { flex: none; font: inherit; font-size: 15px; font-weight: bold; min-height: 40px; padding: 2px 10px; border-radius: 8px; border: 1px solid #e2a35a; background: #fff6ea; color: #8a4a08; cursor: pointer; }
.wlClap.done { background: #f0f3f6; border-color: #c9d2db; color: #5a6170; }
.wlClap:disabled { opacity: 0.6; cursor: default; }
.wlCheck { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 14px; color: var(--sub, #5a6170); cursor: pointer; min-height: 40px; }
.wlCheck input { width: 22px; height: 22px; flex: none; }

/* 窓 (留守の間の手紙・答え集・追い出し) */
.wlModal { position: fixed; inset: 0; z-index: 12; display: flex; align-items: center; justify-content: center; background: rgba(10, 20, 30, 0.45); padding: 16px; }
.wlModalCard { max-width: 520px; max-height: calc(100% - 32px); overflow-y: auto; }
.wlModalHead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.wlModalHead h2 { font-size: 22px; margin: 0; }
.wlModalBody h3 { font-size: 17px; margin: 12px 0 4px; }
.wlLead { margin: 0 0 8px; color: var(--sub, #5a6170); font-size: 16px; }
.wlLetterList { margin: 0 0 8px; padding-left: 1.2em; display: grid; gap: 4px; font-size: 16px; line-height: 1.55; }
/* 航海手帳の「新着」(10-27): 日付と簡単な案内・「詳しく見る」で詳しい案内 */
.wlNewsTab { display: grid; gap: 8px; }
.wlNewsLead { margin: 0 0 2px; color: #5a6170; font-size: 15px; line-height: 1.6; }
.wlNewsItem { padding: 10px 12px; border-radius: 10px; background: #fffaf2; border: 1px solid #e6d8c0; }
.wlNewsHead { display: flex; align-items: flex-start; gap: 10px; }
.wlNewsDate { flex: none; min-width: 3.2em; color: #8a6a3a; font-size: 14px; font-weight: bold; padding-top: 2px; }
.wlNewsText { flex: 1; font-size: 16px; line-height: 1.6; color: #2b2210; }
.wlNewsBtn { flex: none; font-size: 14px; padding: 4px 10px; min-height: 34px; }
.wlNewsMore { margin: 8px 0 0 3.6em; padding-left: 1.1em; display: grid; gap: 4px; font-size: 15px; line-height: 1.6; color: #3a3220; }
.wlNewsMore[hidden] { display: none; }   /* (display: grid が hidden より強いので、閉じた時は消す) */
@media (max-width: 520px) {
  .wlNewsHead { flex-wrap: wrap; }
  .wlNewsText { flex-basis: calc(100% - 4.2em); }
  .wlNewsBtn { margin-left: 3.6em; }
  .wlNewsMore { margin-left: 0; }
}
/* 若葉の方が来た札 (11-10・何人来ても 1 枚・welcome_ui.js の paintWk): 名前の札・押した方へのボタン・まだ選んでいない時の一行 */
.wlNames { gap: 6px; }
.wlBtn.wlName { font-weight: normal; color: #1f2430; background: #f2f8ee; border-color: #9cc79a; }
.wlBtn.wlName.on { color: #fff; background: #1e9a46; border-color: #1e9a46; font-weight: bold; }
.wlBtn.wlMore { font-weight: normal; color: #5a6170; background: #fff; }
.wlFor { padding-top: 6px; border-top: 1px dashed #c9d8c3; }
.wlForName { font-weight: bold; font-size: 15px; color: #1e6a34; }
.wlHint { margin-top: 4px; font-size: 14px; color: #5a6170; }
/* スマホ: 字とボタンを少し小さく・札の高さを抑える (画面の真ん中 = 町の物を押す所に届かない) */
@media (max-width: 700px) {
  #wlCards .item.wlNew .wlHead { font-size: 15px; line-height: 1.4; padding-right: 2px; }
  #wlCards .item.wlNew .wlBtn { font-size: 14px; min-height: 36px; padding: 2px 9px; }
  #wlCards .item.wlNew .wlRow { margin-top: 4px; gap: 5px 6px; }
  #wlCards .item.wlNew .wlHint { font-size: 13px; margin-top: 2px; }
  #wlCards .item.wlNew { padding: 8px 38px 8px 12px; }
}
.wlThanks { margin: 8px 0; padding: 10px 12px; border-radius: 10px; background: #fff6ea; border: 2px solid #e2a35a; color: #2b2210; display: grid; gap: 6px; justify-items: start; }
.wlThanks p { margin: 0; font-size: 16px; line-height: 1.6; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .wlThanks { background: #2a2216; color: #e8eaee; }
  :root:not([data-theme="light"]) .wlClap { background: #2a2216; color: #f0c088; }
  :root:not([data-theme="light"]) .wlClap.done { background: #222a35; color: #a3abb9; }
  :root:not([data-theme="light"]) .wlPill { background: #16301f; color: #c9f0d4; }
}
@media (prefers-reduced-motion: no-preference) {
  #wlCards .item.wlCard { animation: wlIn 0.25s ease-out both; }
  @keyframes wlIn { from { transform: translateY(-6px); opacity: 0; } to { transform: none; opacity: 1; } }
}
/* 公園の掲示に段を足したので、窓が画面より高い時は窓の中で送る (10-26) */
#parkDlg #parkCard { max-height: calc(100dvh - 32px); overflow-y: auto; }
