/*
 * Game notice modals — shared by world / app / guest / battle.
 * Uses the same bottom-sheet language as .world-sheet.
 */
.tida-inline-messages{margin:6px 8px;padding:8px 10px;border:1px solid #6c7654;border-radius:4px;background:#1f2e24;color:#eee5cc;font:13px/1.45 Arial,sans-serif;overflow-wrap:anywhere}
.tida-message-line+.tida-message-line{margin-top:5px;padding-top:5px;border-top:1px solid #6c765455}
.tida-message-line--error{color:#f0aa98}
.tida-message-line p{margin:0}
.tida-toast{position:fixed;z-index:90;left:50%;bottom:calc(12px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);box-sizing:border-box;display:flex;align-items:flex-start;gap:4px;width:calc(100% - 20px);max-width:460px;padding:6px 4px 6px 10px;background:#2a4130;color:#f3e8ca;border:1px solid #83965e;border-radius:6px;box-shadow:0 4px 14px #0006;font:13px/1.4 Arial,sans-serif;overflow-wrap:anywhere;animation:tida-toast-in .18s ease-out}
.tida-toast[hidden]{display:none}
body:has(.world-dock) .tida-toast,body:has(.tida-dock) .tida-toast{bottom:calc(74px + env(safe-area-inset-bottom,0px))}
body:has(#tida-bottom-nav) .tida-toast{bottom:calc(var(--tida-dock-space,62px) + 12px)}
.tida-toast--error{background:#392921;border-color:#b47d60}
.tida-toast-content{flex:1;min-width:0;max-height:25vh;overflow:auto;padding:7px 0}
.tida-toast .tida-toast-close{display:none;flex:0 0 44px;min-width:44px;min-height:44px;padding:0;place-items:center;border:0;background:transparent;color:#e8d5a7;font:24px/1 Arial,sans-serif;cursor:pointer}
.tida-toast.is-enhanced .tida-toast-close{display:grid}
@keyframes tida-toast-in{from{opacity:0}to{opacity:1}}
@media(prefers-reduced-motion:reduce){.tida-toast{animation:none}}
.world-sheet.world-sheet--notice {
  position: fixed;
  inset: auto 0 0;
  width: min(100%, 540px);
  max-width: 540px;
  max-height: 85vh;
  max-height: 85svh;
  margin: auto auto 0;
  padding: 0 0 env(safe-area-inset-bottom, 0px);
  color: #f4e9d5;
  background: #141f27;
  border: 1px solid #ac8f5a;
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -10px 60px #0009;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  z-index: 80;
}

.world-sheet.world-sheet--notice:not([open]) { display: none; }
.world-sheet.world-sheet--notice[open] { animation: tida-notice-in .22s ease-out; }
.world-sheet.world-sheet--notice::backdrop { background: #040a10b0; backdrop-filter: blur(4px); }

.world-sheet--notice .world-sheet-body,
.world-sheet--notice .tida-notice-body {
  position: relative;
  padding: 26px 22px 24px;
}

.world-sheet--notice .tida-notice-eyebrow,
.world-sheet--notice .world-eyebrow {
  display: block;
  padding-right: 40px;
  color: #c8ac73;
  font-size: 9px;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.world-sheet--notice .tida-notice-content {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.65;
  color: #b1bec1;
}

.world-sheet--notice .tida-notice-line {
  margin: 0 0 10px;
  color: #eee0bf;
}

.world-sheet--notice .tida-notice-line--error,
.world-sheet--notice .tida-notice-line--error .red,
.world-sheet--notice .red {
  color: #f0a090 !important;
}

.world-sheet--notice .lime,
.world-sheet--notice .green2,
.world-sheet--notice .yellow {
  color: #d5b679 !important;
}

.world-sheet--notice .tida-notice-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.world-sheet--notice .tida-notice-actions form {
  margin: 0;
}

.world-sheet--notice .tida-notice-actions input.but2,
.world-sheet--notice .tida-notice-yes {
  width: 100%;
  min-height: 48px;
  color: #fff0ce !important;
  font: 16px Georgia, serif;
  background: linear-gradient(#ad7b39, #7e5528 50%, #674525);
  border: 1px solid #f1cb80;
  border-radius: 9px;
  box-shadow: inset 0 0 0 3px #6b4a25, inset 0 0 0 4px #c79649;
  cursor: pointer;
}

.world-sheet--notice .tida-notice-actions input.but3,
.world-sheet--notice .tida-notice-no,
.world-sheet--notice input.but3 {
  width: 100%;
  min-height: 44px;
  color: #e4cca0 !important;
  background: #223028;
  border: 1px solid #515f4b;
  border-radius: 8px;
  cursor: pointer;
}

.world-sheet--notice .world-sheet-close,
.world-sheet--notice .tida-notice-close {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: #d5b679;
  background: linear-gradient(140deg, #28323be8, #0d141cea);
  border: 1px solid #7e6d50;
  border-radius: 9px;
  cursor: pointer;
}

.world-sheet--notice .tida-notice-close .tida-icon {
  width: 18px;
  height: 18px;
}

.world-sheet--notice.tida-notice-fallback {
  display: block;
  position: relative;
  inset: auto;
  width: auto;
  max-width: none;
  margin: 12px;
  border-radius: 12px;
  border-bottom: 1px solid #ac8f5a;
}

@keyframes tida-notice-in {
  from { opacity: .4; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .world-sheet.world-sheet--notice[open] { animation: none; }
}

/* Hide legacy inline notice strip when modal chrome is active */
body.tida-world-page .world-notices .h2b.brt,
body.tida-app-page .h2b.brt:has(.lime):not(.tida-keep-banner),
body.tida-guest-page .guest-notices .h2b.brt {
  /* notices now in dialog; keep empty wrappers collapsed */
}
body.tida-world-page .world-notices:empty,
body.tida-guest-page .guest-notices:empty {
  display: none;
}
