/* ===========================
   DENOSA Modern Mockups
   - HTML/CSS/JS
   - Home screen layout
   - Mobile-first, modern, glassy cards
============================ */

:root {
  --brand-red: #a31319;
  --brand-red-900: #7f0d12;
  --brand-gold: #f6b52e;
  --brand-gold-50: #fff4d6;
  --page-bg: #f8f7f5;
  --gold-glow: rgba(246, 181, 46, 0.12);
  --ink: #1c1a19;
  --muted: #6a625f;
  --card: rgba(255, 255, 255, 0.86);
  --surface: rgba(255, 255, 255, 0.72);
  --stroke: rgba(163, 19, 25, 0.12);
  --accent-teal: #0f766e;
  --radius: 18px;
  --radius-lg: 26px;
  --shadow-lg: 0 22px 48px rgba(16, 24, 40, 0.16);
  --shadow-sm: 0 8px 20px rgba(16, 24, 40, 0.12);
  --shadow-xl: 0 35px 80px rgba(16, 24, 40, 0.22);
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype",
    "Book Antiqua", Palatino, serif;
  --font-sans: "Plus Jakarta Sans", "Segoe UI Variable", "Trebuchet MS",
    Verdana, sans-serif;
}

* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  min-height: 100svh;
  color: var(--ink);
  background: var(--page-bg);
  font-family: var(--font-sans);
  line-height: 1.35;
  letter-spacing: -0.01em;
  overflow: hidden;
  overscroll-behavior: none;
}

/* App frame */
.app {
  width: 100%;
  max-width: 400px;
  height: 100svh;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: var(--page-bg);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(18px) saturate(1.2);
}

.app::before {
  content: "";
  position: absolute;
  inset: -30% -20% auto;
  height: 240px;
  background: none;
  opacity: 0;
  pointer-events: none;
}

.app::after {
  content: "";
  position: absolute;
  inset: auto -20% -35%;
  height: 280px;
  background: none;
  opacity: 0;
  pointer-events: none;
}

.app > * {
  position: relative;
  z-index: 1;
}

/* Top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: start;
  padding: 4px 16px 14px;
  min-height: 132px;
  background: transparent;
  color: var(--ink);
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  transition: padding 0.25s ease, min-height 0.25s ease;
}
.topbarCenter {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  transition: align-items 0.25s ease;
}
.topbarLogo {
  width: 92px;
  height: 92px;
  margin-top: 16px;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(47, 36, 19, 0.16));
  transition: width 0.25s ease, height 0.25s ease, margin-top 0.25s ease;
}
.iconButton {
  position: relative;
  width: 48px;
  height: 48px;
  margin-top: 0;
  border-radius: 999px;
  border: none;
  background: rgba(242, 180, 57, 0.78);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 18px rgba(16, 24, 40, 0.12);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease,
    background 0.2s ease, border-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.iconButton svg {
  width: 22px;
  height: 22px;
  position: relative;
  z-index: 1;
}
.menuOverlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 16, 14, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 6;
}
.menuDrawer {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(78%, 280px);
  background: #fff;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 12px 0 28px rgba(16, 24, 40, 0.18);
  transform: translateX(-100%);
  transition: transform 0.28s ease;
}
.menuHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.2px;
  color: var(--brand-red-900);
}
.menuTitle {
  display: flex;
  align-items: center;
  gap: 10px;
}
.menuLogo {
  display: none;
}
.menuClose {
  width: 40px;
  height: 40px;
}
.menuClose svg {
  width: 20px;
  height: 20px;
}
.menuNav {
  display: grid;
  gap: 10px;
}
.menuFooter {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.menuFooterLogo {
  width: 88px;
  height: 88px;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(47, 36, 19, 0.18));
}
.menuNav a {
  text-decoration: none;
  color: var(--brand-red);
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 999px;
  background: linear-gradient(
    135deg,
    rgba(163, 19, 25, 0.08),
    rgba(246, 181, 46, 0.36)
  );
  border: 1px solid rgba(246, 181, 46, 0.4);
  font-size: 12px;
  letter-spacing: 0.3px;
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.08);
  width: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease,
    background 0.2s ease, border-color 0.2s ease;
}
.menuNav a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

[data-magazine-entry][hidden] {
  display: none !important;
}

.noticeItem {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 12px 14px 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
  backdrop-filter: blur(10px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.menuNav a:focus {
  outline: none;
}
.menuNav a:focus-visible {
  outline: 2px solid rgba(246, 181, 46, 0.7);
  outline-offset: 2px;
}
/* Notification drawer */
.noticeOverlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 16, 14, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 6;
}
.noticeDrawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(78%, 280px);
  background: #fff;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: -12px 0 28px rgba(16, 24, 40, 0.18);
  transform: translateX(100%);
  transition: transform 0.28s ease;
}
.noticeHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.2px;
  color: var(--brand-red-900);
}
.noticeClose {
  width: 40px;
  height: 40px;
}
.noticeList {
  display: grid;
  gap: 10px;
}
.noticeText {
  display: grid;
  gap: 4px;
}
.noticeText b {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.2px;
  display: block;
}
.noticeText p {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0;
}
.noticeMeta {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0;
}
.noticeMore {
  margin-top: auto;
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(
    135deg,
    rgba(163, 19, 25, 0.08),
    rgba(246, 181, 46, 0.36)
  );
  border: 1px solid rgba(246, 181, 46, 0.4);
  font-size: 10px;
  color: var(--brand-red);
  font-weight: 700;
  letter-spacing: 0.2px;
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.08);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease,
    background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.noticeMore:focus {
  outline: none;
}
.noticeMore:focus-visible {
  outline: 2px solid rgba(246, 181, 46, 0.7);
  outline-offset: 2px;
  border-radius: 999px;
}
/* Notification details modal */
.noticeModal {
  position: absolute;
  inset: 0;
  background: rgba(20, 16, 14, 0.28);
  display: grid;
  place-items: center;
  padding: 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 7;
}
.noticeModalCard {
  width: min(92%, 380px);
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(246, 181, 46, 0.18);
  padding: 22px;
  box-shadow: var(--shadow-lg);
  display: grid;
  gap: 6px;
  min-height: 220px;
  position: relative;
}
.noticeModalHeader {
  display: grid;
  gap: 10px;
  padding-top: 22px;
  padding-right: 48px;
}
.noticeModalHeader .noticeModalClose {
  position: absolute;
  top: 14px;
  right: 14px;
}
.noticeModalTitle {
  font-family: var(--font-display);
  color: var(--brand-red-900);
  font-size: 16px;
  line-height: 1.2;
  margin: 0;
}
.noticeModalBody {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}
.noticeModalClose {
  width: 28px;
  height: 28px;
  margin: 0;
}
.noticeModalClose svg {
  width: 14px;
  height: 14px;
}
/* Membership confirmation modal */
.memberConfirmModal {
  position: absolute;
  inset: 0;
  background: rgba(20, 16, 14, 0.32);
  display: grid;
  place-items: center;
  padding: 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 8;
}
.memberConfirmCard {
  width: min(92%, 380px);
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(246, 181, 46, 0.2);
  padding: 22px;
  box-shadow: var(--shadow-lg);
  display: grid;
  gap: 12px;
  position: relative;
}
.memberConfirmHeader {
  padding-top: 22px;
  padding-right: 48px;
  font-family: var(--font-display);
  color: var(--brand-red-900);
  font-size: 18px;
  letter-spacing: 0.2px;
}
.memberConfirmClose {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  margin: 0;
}
.memberConfirmClose svg {
  width: 14px;
  height: 14px;
}
.memberConfirmBody {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
.memberConfirmForm {
  display: grid;
  gap: 12px;
}
.memberField {
  display: grid;
  gap: 6px;
  font-size: 11px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--muted);
}
.memberInput {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(163, 19, 25, 0.18);
  padding: 10px 12px;
  font-size: 14px;
  font-family: var(--font-sans);
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(16, 24, 40, 0.08);
}
.memberInput:focus {
  outline: none;
}
.memberInput:focus-visible {
  outline: 2px solid rgba(246, 181, 46, 0.7);
  outline-offset: 2px;
}
.memberConfirmError {
  margin: 0;
  min-height: 18px;
  font-size: 12px;
  color: #b42318;
  letter-spacing: 0;
  text-transform: none;
}
/* Feature modals */
.featureModal {
  position: absolute;
  inset: 0;
  background: rgba(20, 16, 14, 0.3);
  display: grid;
  place-items: center;
  padding: 18px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 8;
}
.featureModal.is-open {
  opacity: 1;
  pointer-events: auto;
}
.featureModalCard {
  width: min(92%, 380px);
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(246, 181, 46, 0.2);
  padding: 22px;
  box-shadow: var(--shadow-lg);
  display: grid;
  gap: 12px;
  position: relative;
}
.featureModalCard--large {
  width: min(94%, 560px);
  height: min(88svh, 860px);
  max-height: calc(100svh - 36px);
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  margin: auto;
}
.featureModalCard--terms {
  width: min(92%, 460px);
}
.featureModalHeader {
  padding-top: 22px;
  padding-right: 48px;
  font-family: var(--font-display);
  color: var(--brand-red-900);
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: 0.2px;
}
.featureModalBody {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
.featureModalBody--terms {
  color: var(--ink);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}
.featureModalForm {
  display: grid;
  gap: 12px;
}
.createMemberScroll {
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scroll-behavior: auto;
  scrollbar-gutter: stable;
  padding-right: 6px;
  padding-bottom: 10px;
}
.featureModalForm--create-member {
  overflow: visible;
  padding-right: 0;
  padding-bottom: 0;
  align-content: start;
}
.createMemberSection {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(163, 19, 25, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.58);
}
.createMemberSection:first-of-type {
  border-top: 1px solid rgba(163, 19, 25, 0.16);
}
.createMemberSection h3 {
  grid-column: 1 / -1;
  margin: -12px -12px 0;
  padding: 9px 12px;
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1.2;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-red), var(--brand-red-900));
  border-radius: 11px 11px 0 0;
  letter-spacing: 0.2px;
}
.createMemberSectionAction {
  justify-self: start;
  min-height: 34px;
  padding: 7px 12px;
  font-size: 12px;
  box-shadow: none;
}
.featureModalField--full {
  grid-column: 1 / -1;
}
.featureModalRadioGroup {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
}
.featureModalRadioGroup label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(163, 19, 25, 0.18);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}
.featureModalRadioGroup label:has(input:checked) {
  border-color: rgba(163, 19, 25, 0.38);
  background: rgba(246, 181, 46, 0.18);
  color: var(--brand-red-900);
}
.featureModalRadioGroup input {
  margin: 0;
  accent-color: var(--brand-red);
}
.featureModalCheckbox {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 0 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.featureModalCheckbox input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--brand-red);
}
.hospitalPickerField {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}
.hospitalPickerField .btn {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  justify-content: center;
  border-color: rgba(163, 19, 25, 0.16);
  color: var(--brand-red);
}
.hospitalPickerField .featureModalInput[readonly] {
  cursor: pointer;
}
.hospitalPickerModal {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(20, 16, 14, 0.34);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.hospitalPickerCard {
  width: min(94%, 520px);
  max-height: min(84vh, 720px);
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(246, 181, 46, 0.2);
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  padding: 22px;
  position: relative;
}
.hospitalPickerSearch {
  min-height: 42px;
}
.hospitalPickerTableWrap {
  min-height: 0;
  overflow: auto;
  border: 1px solid rgba(163, 19, 25, 0.14);
  border-radius: 12px;
  background: #fff;
}
.hospitalPickerTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  color: var(--ink);
  letter-spacing: 0;
}
.hospitalPickerTable th,
.hospitalPickerTable td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(163, 19, 25, 0.1);
  text-align: left;
  vertical-align: middle;
}
.hospitalPickerTable th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--brand-gold-50);
  color: var(--brand-red-900);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.hospitalPickerTable td:last-child,
.hospitalPickerTable th:last-child {
  width: 84px;
  text-align: right;
}
.hospitalPickerSelect {
  padding: 6px 10px;
  font-size: 11px;
  box-shadow: none;
}
.hospitalPickerModal[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}
.featureModalNote {
  margin-top: -4px;
}
.featureModalField {
  display: grid;
  gap: 6px;
  font-size: 11px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--muted);
}
.featureModalField--error {
  color: #b42318;
}
.featureModalField--error .featureModalInput {
  border-color: rgba(180, 35, 24, 0.72);
  box-shadow: 0 0 0 2px rgba(180, 35, 24, 0.12);
}
.featureModalField--error .featureModalLookupTrigger {
  border-color: rgba(180, 35, 24, 0.72);
  box-shadow: 0 0 0 2px rgba(180, 35, 24, 0.12);
}
.featureModalInput {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(163, 19, 25, 0.18);
  padding: 10px 12px;
  font-size: 14px;
  font-family: var(--font-sans);
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(16, 24, 40, 0.08);
}
.featureModalInput::placeholder {
  color: #8b817c;
  font-style: italic;
}
.featureModalInput:where(select) {
  cursor: pointer;
  position: relative;
  z-index: 2;
}
.featureModalInput.is-enhanced-searchable {
  display: none;
}
textarea.featureModalInput {
  font-family: inherit;
  line-height: 1.4;
  resize: none;
  overflow: hidden;
  overflow-wrap: anywhere;
}
textarea.cascadeReadonly {
  min-height: calc(1.4em + 22px);
}
.featureModalLookupCombo {
  position: relative;
}
.featureModalLookupTrigger {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(163, 19, 25, 0.18);
  padding: 10px 38px 10px 12px;
  font-size: 14px;
  font-family: var(--font-sans);
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(16, 24, 40, 0.08);
  text-align: left;
  cursor: pointer;
  position: relative;
}
.featureModalLookupTrigger::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid #5d5753;
  border-bottom: 2px solid #5d5753;
  transform: translateY(-60%) rotate(45deg);
  pointer-events: none;
}
.featureModalLookupCombo.is-open .featureModalLookupTrigger::after {
  transform: translateY(-30%) rotate(-135deg);
}
.featureModalLookupTrigger:focus {
  outline: none;
}
.featureModalLookupTrigger:focus-visible {
  outline: 2px solid rgba(246, 181, 46, 0.7);
  outline-offset: 2px;
}
.featureModalLookupPanel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: #fff;
  border: 1px solid rgba(163, 19, 25, 0.2);
  border-radius: 12px;
  box-shadow: 0 14px 26px rgba(16, 24, 40, 0.18);
  z-index: 35;
  padding: 8px;
  display: grid;
  gap: 8px;
}
.featureModalLookupPanel[hidden] {
  display: none;
}
.featureModalLookupSearchInput {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(163, 19, 25, 0.2);
  padding: 8px 10px;
  font-size: 13px;
  font-family: var(--font-sans);
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  background: #fff;
}
.featureModalLookupSearchInput:focus {
  outline: none;
}
.featureModalLookupSearchInput:focus-visible {
  outline: 2px solid rgba(246, 181, 46, 0.7);
  outline-offset: 2px;
}
.featureModalLookupList {
  max-height: 230px;
  overflow-y: auto;
  display: grid;
  gap: 4px;
}
.featureModalLookupOption {
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 8px 10px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-size: 13px;
  font-family: var(--font-sans);
  cursor: pointer;
}
.featureModalLookupOption:hover,
.featureModalLookupOption:focus-visible,
.featureModalLookupOption.is-selected {
  background: rgba(246, 181, 46, 0.18);
}
.featureModalLookupOption:focus {
  outline: none;
}
.featureModalLookupEmpty {
  margin: 0;
  padding: 8px 10px;
  font-size: 12px;
  color: #7b736f;
  text-transform: none;
  letter-spacing: 0;
}
.featureModalInput:focus {
  outline: none;
}
.featureModalInput:focus-visible {
  outline: 2px solid rgba(246, 181, 46, 0.7);
  outline-offset: 2px;
}
.featureModalInfo {
  display: grid;
  gap: 10px;
}
.featureModalRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--brand-gold-50);
  border: 1px solid rgba(246, 181, 46, 0.35);
}
.featureModalLabel {
  font-size: 11px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--muted);
}
.featureModalValue {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0;
}
.featureModalActions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.featureModalActions .btn {
  width: 100%;
  justify-content: center;
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: 0.2px;
}
a[data-magazine-open][aria-disabled="true"] {
  opacity: 0.65;
  cursor: not-allowed;
}
.featureModalClose {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  margin: 0;
}
.featureModalClose svg {
  width: 14px;
  height: 14px;
}

.applicationStatusFeedback {
  margin: 0;
  min-height: 18px;
  font-size: 12px;
  color: #b42318;
  letter-spacing: 0;
  text-transform: none;
}

.applicationStatusFeedback.is-success {
  color: #1f6f43;
}

.applicationStatusSubtitleAlert {
  color: #b42318;
  font-weight: 600;
}

.applicationStatusInfo .featureModalRow {
  align-items: flex-start;
}

.applicationStatusValueMultiline {
  text-align: right;
  white-space: normal;
  max-width: 58%;
}

.featureModalForm.is-readonly-status .featureModalInput[readonly] {
  background: #f3f1ec;
  color: #5d5753;
  cursor: default;
}

.featureModalForm.is-readonly-status [data-application-status-submit] {
  display: none !important;
}

.cardActionBadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 6px;
  border-radius: 999px;
  background: #b42318;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.featureModal[data-modal="support-chat"] {
  padding: 0;
}

.featureModalCard--support {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  border-radius: 0;
  border: 0;
  box-shadow: none;
  padding: 18px 14px 14px;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.supportChatToolbar {
  display: grid;
  gap: 10px;
}

.supportChatMeta {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.supportChatActions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.supportChatActions .btn {
  flex: 1;
  min-width: 120px;
}

.supportTicketPanel,
.supportConversationPanel {
  min-height: 0;
}

.supportTicketPanel[hidden],
.supportConversationPanel[hidden] {
  display: none;
}

.supportTicketList {
  display: grid;
  gap: 10px;
  height: auto;
  align-content: start;
  align-items: start;
  grid-auto-rows: max-content;
  overflow-y: auto;
  padding-right: 4px;
}

.supportTicketItem {
  border: 1px solid rgba(163, 19, 25, 0.2);
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 7px;
  align-self: start;
}

.supportTicketItem.is-active {
  border-color: rgba(163, 19, 25, 0.58);
  box-shadow: 0 0 0 2px rgba(163, 19, 25, 0.12);
}

.supportTicketItem.has-admin-reply {
  border-color: rgba(15, 118, 110, 0.44);
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.08), rgba(255, 255, 255, 0.98));
}

.supportTicketTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.supportTicketRef {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}

.supportTicketStatus {
  font-size: 10px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--muted);
}

.supportTicketPreview {
  font-size: 12px;
  color: #5d5753;
  line-height: 1.35;
}

.supportTicketMeta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 10px;
  color: #7b736f;
}

.supportTicketMetaRight {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.supportTicketAttention {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(15, 118, 110, 0.3);
  background: rgba(15, 118, 110, 0.13);
  color: #0b6158;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

.supportTicketUnread {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #b42318;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.supportTicketOpenBtn {
  border: 1px solid rgba(163, 19, 25, 0.22);
  border-radius: 999px;
  background: #fff;
  color: #731412;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 11px;
  cursor: pointer;
}

.supportTicketOpenBtn:focus {
  outline: none;
}

.supportTicketOpenBtn:focus-visible {
  outline: 2px solid rgba(246, 181, 46, 0.72);
  outline-offset: 2px;
}

.supportTicketEmpty,
.supportMessageEmpty {
  margin: 0;
  font-size: 12px;
  color: #7b736f;
  line-height: 1.4;
  padding: 10px;
  border-radius: 12px;
  border: 1px dashed rgba(163, 19, 25, 0.25);
  background: rgba(246, 181, 46, 0.08);
}

.supportConversationPanel {
  display: grid;
  gap: 10px;
  grid-template-rows: minmax(0, 1fr) auto;
}

.supportMessageList {
  min-height: 0;
  border: 1px solid rgba(163, 19, 25, 0.14);
  border-radius: 14px;
  background: #fff;
  padding: 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.supportMessageItem {
  max-width: 92%;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink);
  border: 1px solid rgba(163, 19, 25, 0.14);
  background: #fff;
}

.supportMessageItem--user {
  margin-left: auto;
  background: rgba(163, 19, 25, 0.08);
  border-color: rgba(163, 19, 25, 0.22);
}

.supportMessageItem--admin {
  margin-right: auto;
  background: rgba(15, 118, 110, 0.08);
  border-color: rgba(15, 118, 110, 0.24);
}

.supportMessageItem--system {
  margin-right: auto;
  background: rgba(246, 181, 46, 0.14);
  border-color: rgba(246, 181, 46, 0.35);
}

.supportMessageAuthor {
  display: block;
  margin-bottom: 3px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: #5d5753;
}

.supportMessageText {
  white-space: pre-wrap;
  word-break: break-word;
}

.supportMessageTime {
  margin-top: 5px;
  font-size: 10px;
  color: #7b736f;
}

.supportComposer {
  display: grid;
  gap: 8px;
}

.supportComposerInput {
  min-height: 84px;
  resize: vertical;
}

.supportComposerActions {
  display: flex;
  justify-content: flex-end;
}

.supportCtaButtons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.supportCtaBtn {
  padding: 6px 14px;
  font-size: 12px;
  font-family: inherit;
  font-weight: 500;
  border-radius: 20px;
  border: 1.5px solid rgba(163, 19, 25, 0.5);
  background: transparent;
  color: rgb(163, 19, 25);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  line-height: 1.4;
}

.supportCtaBtn:hover {
  background: rgba(163, 19, 25, 0.08);
}

.supportClearConfirm {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 28px 24px;
  background: rgba(255, 255, 255, 0.97);
  text-align: center;
}

.supportClearConfirm[hidden] {
  display: none;
}

.supportClearConfirmText {
  font-size: 15px;
  color: #2d2926;
  line-height: 1.5;
  margin: 0;
}

.supportClearConfirm .featureModalActions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
/* Loader */
.appLoader {
  position: absolute;
  inset: 0;
  background: rgba(20, 16, 14, 0.22);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 9;
}
.appLoaderCard {
  background: #fff;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid rgba(246, 181, 46, 0.2);
  box-shadow: var(--shadow-lg);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}
.loaderSpinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid rgba(246, 181, 46, 0.45);
  border-top-color: var(--brand-red);
  animation: spin 0.9s linear infinite;
}
.appLoaderText {
  letter-spacing: 0.2px;
}
/* Toast */
.appToast {
  position: absolute;
  top: 18px;
  right: 18px;
  transform: translateX(110%);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  border: 1px solid rgba(246, 181, 46, 0.35);
  padding: 10px 16px;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.25s ease;
  z-index: 9;
  max-width: min(88%, 320px);
  font-size: 12px;
}
.appToastText {
  letter-spacing: 0.2px;
}
body.notice-open .noticeOverlay {
  opacity: 1;
  pointer-events: auto;
}
body.notice-open .noticeDrawer {
  transform: translateX(0);
}
body.notice-open .screen {
  overflow: hidden;
}
body.notice-modal-open .noticeModal {
  opacity: 1;
  pointer-events: auto;
}
body.member-confirm-open .memberConfirmModal {
  opacity: 1;
  pointer-events: auto;
}
body.feature-modal-open .screen {
  overflow: hidden;
}
body.app-loading .appLoader {
  opacity: 1;
  pointer-events: auto;
}
body.toast-open .appToast {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}
body.menu-open .menuOverlay {
  opacity: 1;
  pointer-events: auto;
}
body.menu-open .menuDrawer {
  transform: translateX(0);
}
body.menu-open .screen {
  overflow: hidden;
}
body.member-confirm-open .screen {
  overflow: hidden;
}
body.topbar-compact .topbar {
  min-height: 72px;
  padding: 10px 16px;
  align-items: center;
}
body.topbar-compact .topbarCenter {
  align-items: center;
}
body.topbar-compact .topbarLogo {
  width: 48px;
  height: 48px;
  margin-top: 0;
}
.iconButton:focus {
  outline: none;
}
.iconButton:focus-visible {
  outline: 2px solid rgba(246, 181, 46, 0.7);
  outline-offset: 2px;
}
.iconButton.hasBadge::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e11d48;
  border: 2px solid #fff;
  top: 8px;
  right: 9px;
  z-index: 2;
  box-shadow: 0 4px 10px rgba(225, 29, 72, 0.35);
}
.logo {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, #ffffff, #ffe3a6);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.2);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.brand {
  display: flex;
  flex-direction: column;
}
.brand b {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.6px;
}
.brand small {
  font-size: 10px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  opacity: 0.9;
}

/* Content wrapper (below topbar) */
.content {
  min-height: 0;
  position: relative;
  padding: 0;
  overflow: hidden;
  background: var(--page-bg);
}

/* Screen containers */
.screen {
  display: none;
  height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-top: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(163, 19, 25, 0.3) transparent;
}
.screen.active {
  display: block;
  animation: rise 0.45s ease;
}
.screen::-webkit-scrollbar {
  width: 6px;
}
.screen::-webkit-scrollbar-thumb {
  background: rgba(163, 19, 25, 0.25);
  border-radius: 999px;
}
.screen::-webkit-scrollbar-track {
  background: transparent;
}
.screen::-webkit-scrollbar-button {
  width: 0;
  height: 0;
  display: none;
}

/* ===== HOME ===== */

.hero {
  padding: 20px 18px 10px;
  display: grid;
  gap: 14px;
}
.heroCard {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: radial-gradient(
      200px 140px at 10% 20%,
      rgba(255, 255, 255, 0.7) 0%,
      transparent 60%
    ),
    radial-gradient(
      220px 160px at 100% 0%,
      rgba(255, 255, 255, 0.55) 0%,
      transparent 70%
    ),
    linear-gradient(135deg, #ffd48c 0%, #f6b52e 52%, #e08b2b 100%);
  color: #2f2413;
  padding: 20px 18px 18px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow-xl);
  z-index: 0;
}
.heroLogoCard {
  display: grid;
  place-items: center;
  padding: 12px 18px 4px;
  min-height: 120px;
  background: transparent;
  border: none;
  box-shadow: none;
}
.heroLogo {
  width: 48%;
  max-width: 160px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(47, 36, 19, 0.14));
}
.heroLogoCard::after {
  display: none;
}
.heroCard::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    260px 120px at 70% -10%,
    rgba(255, 255, 255, 0.4),
    transparent 70%
  );
  z-index: 0;
  pointer-events: none;
}
.heroCard > * {
  position: relative;
  z-index: 1;
}
.hero h1 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: 0.3px;
}
.hero p {
  margin: 0;
  font-size: 13px;
  color: #5a3c18;
}
.hero .ctaRow {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.btn {
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: #3a2b00;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(16, 24, 40, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease,
    background 0.2s ease, color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn.primary {
  background: linear-gradient(135deg, var(--brand-red), #d64b2b);
  border-color: transparent;
  color: #fff;
}
.btn.ghost {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(255, 255, 255, 0.8);
  color: #5a3f10;
  backdrop-filter: blur(6px);
}
.btn svg {
  width: 18px;
  height: 18px;
}
.btn:focus {
  outline: none;
}
.btn:focus-visible {
  outline: 2px solid rgba(246, 181, 46, 0.8);
  outline-offset: 2px;
}

/* Quick grid */
.grid {
  padding: 12px 16px 32px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 12px 14px 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
  backdrop-filter: blur(10px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cardHeader {
  display: flex;
  align-items: center;
  gap: 12px;
}
.card .icon {
  width: 28px;
  height: 28px;
  color: rgba(163, 19, 25, 0.9);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.card .icon svg {
  width: 22px;
  height: 22px;
}
.card b {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.2px;
}
.card p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.cardActions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cardActions a {
  margin-top: 0;
}

.card a {
  margin-top: auto;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(
    135deg,
    rgba(163, 19, 25, 0.08),
    rgba(246, 181, 46, 0.36)
  );
  border: 1px solid rgba(246, 181, 46, 0.4);
  font-size: 12px;
  color: var(--brand-red);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.3px;
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease,
    background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.card a:focus {
  outline: none;
}
.card a:focus-visible {
  outline: 2px solid rgba(246, 181, 46, 0.7);
  outline-offset: 2px;
}


.heroCard {
  animation: rise 0.5s ease;
}

.grid .card {
  animation: rise 0.5s ease;
}
.grid .card:nth-child(2) {
  animation-delay: 0.04s;
}
.grid .card:nth-child(3) {
  animation-delay: 0.08s;
}
.grid .card:nth-child(4) {
  animation-delay: 0.12s;
}
.grid .card:nth-child(5) {
  animation-delay: 0.16s;
}
.grid .card:nth-child(6) {
  animation-delay: 0.2s;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (hover: hover) {
  .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 24px rgba(16, 24, 40, 0.16);
  }
  .iconButton:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(16, 24, 40, 0.14);
    background: rgba(245, 188, 69, 0.86);
  }
  .menuNav a:hover {
    transform: translateX(2px);
    box-shadow: 0 12px 22px rgba(16, 24, 40, 0.14);
    background: linear-gradient(
      135deg,
      rgba(163, 19, 25, 0.14),
      rgba(246, 181, 46, 0.5)
    );
    border-color: rgba(246, 181, 46, 0.55);
  }
  .card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
  }
  .noticeItem:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
  }
  .card a:hover,
  .noticeMore:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(16, 24, 40, 0.14);
    background: linear-gradient(
      135deg,
      rgba(163, 19, 25, 0.18),
      rgba(246, 181, 46, 0.45)
    );
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media (min-width: 640px) {
  .app {
    height: calc(100svh - 32px);
    margin: 16px auto;
    border-radius: 28px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
  }
  .featureModalActions {
    flex-direction: row;
  }
  .featureModalActions .btn {
    width: auto;
  }
}
