/*
 * Game notice modals — shared by world / app / guest / battle.
 * Uses the same bottom-sheet language as .world-sheet.
 */
.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 #a78a55;
  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(#a87634, #795023 50%, #624020);
  border: 1px solid #f1cb80;
  border-radius: 9px;
  box-shadow: inset 0 0 0 3px #664520, 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: #1c2a22;
  border: 1px solid #4b5945;
  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 #79684b;
  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 #a78a55;
}

@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;
}
