:root {
  --panel: rgba(255, 255, 255, 0.76);
  --panel-strong: rgba(255, 255, 255, 0.88);
  --panel-soft: rgba(248, 255, 248, 0.72);
  --text: #1e3a2b;
  --muted: #4c6758;
  --line: rgba(34, 76, 52, 0.12);
  --accent: #ffd86b;
  --accent-strong: #8edb88;
  --accent-deep: #4fa565;
  --danger: #d95d5d;
  --shadow: 0 18px 42px rgba(33, 75, 45, 0.14);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}


html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Segoe UI", "Hiragino Sans", "Yu Gothic", "Meiryo", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: transparent;
  /* iOS 无障碍“大字体”下避免浏览器额外二次缩放导致布局突变 */
  -webkit-text-size-adjust: 100%;
  cursor: url('./images/cursor-hand-woman-48.png') 10 3, auto;
}

button,
a,
.primary-btn,
.ghost-btn,
.small-btn,
.danger-btn,
.icon-btn,
.copy-icon-btn,
.manage-actions button,
#logoutBtn {
  cursor: url('./images/cursor-hand-woman-48.png') 10 3, pointer;
}

input[type="text"],
input[type="password"],
textarea,
select {
  cursor: text;
}

button,
input,
textarea,
select {
  font: inherit;
}

textarea {
  resize: vertical;
}

.hidden {
  display: none !important;
}

.fake-hidden {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.shell {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px 18px 46px;
  min-height: 100dvh;
  /* 大字号/无障碍模式下不要裁掉内容，允许页面滚动 */
  overflow-x: hidden;
  overflow-y: auto;
}

/* 登录界面时，让登录小卡片在视口内上下左右居中 */
.login-mode .shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.login-mode .login-panel {
  margin: 0 auto;
}

.shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(255, 249, 214, 0.24), rgba(236, 255, 236, 0.28)),
    url('./images/sunny-golf-bg.jpg') center / cover no-repeat,
    url('./images/golf-course-bg.svg') center / cover no-repeat;
}

.shell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at top left, rgba(255, 233, 122, 0.18), transparent 30%),
    radial-gradient(circle at top right, rgba(126, 214, 123, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.10));
  pointer-events: none;
}

.panel {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.subpanel {
  background: var(--panel-soft);
}

.page-section,
.inner-panel {
  padding: 22px;
}

.login-panel {
  /* 改成正常文档流，避免绝对定位导致的大字号内容无法滚动/被裁切 */
  position: relative;
  width: min(430px, calc(100% - 24px));
  margin: clamp(18px, 8vh, 60px) auto;
  padding: 30px;
  background: var(--panel-strong);
  transform: none;

  /* 防止极端大字号/小屏高度导致溢出 */
  max-height: calc(100dvh - 60px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.simple-title,
.section-title,
.section-head h3 {
  margin: 0;
}

.simple-title {
  font-size: 34px;
  line-height: 1.15;
  margin-bottom: 8px;
  color: #1b4f37;
}

.section-title {
  font-size: 28px;
  color: #18482f;
}

.stack-lg > * + * {
  margin-top: 18px;
}

.stack-md > * + * {
  margin-top: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field span {
  font-size: 14px;
  color: var(--muted);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  border: 1px solid rgba(44, 93, 58, 0.13);
  border-radius: 16px;
  padding: 13px 15px;
  outline: none;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: rgba(117, 201, 123, 0.95);
  box-shadow: 0 0 0 4px rgba(152, 222, 119, 0.18);
}

/* 登录框使用 text 类型，但视觉上仍显示为掩码字符 */
#passwordInput {
  -webkit-text-security: disc;
  text-security: disc;
}

.primary-btn,
.ghost-btn,
.small-btn,
.danger-btn,
.icon-btn,
.copy-icon-btn {
  border: 0;
  transition: transform 0.16s ease, opacity 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.primary-btn:hover,
.ghost-btn:hover,
.small-btn:hover,
.danger-btn:hover,
.icon-btn:hover,
.copy-icon-btn:hover {
  transform: translateY(-1px);
}

.primary-btn {
  border-radius: 16px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #ffe88b, #8ee28e);
  color: #174229;
  font-weight: 800;
  box-shadow: 0 10px 20px rgba(125, 191, 106, 0.18);
}

.ghost-btn,
.small-btn {
  border-radius: 14px;
  padding: 11px 15px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  border: 1px solid rgba(32, 48, 42, 0.08);
}

.danger-btn {
  border-radius: 14px;
  padding: 11px 15px;
  background: rgba(217, 93, 93, 0.10);
  color: #9b2f2f;
  border: 1px solid rgba(217, 93, 93, 0.20);
}

.icon-btn {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255, 240, 161, 0.96), rgba(161, 228, 166, 0.96));
  box-shadow: 0 10px 24px rgba(97, 169, 89, 0.18);
}

.icon-btn svg {
  width: 24px;
  height: 24px;
  stroke: #165135;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.message {
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--muted);
  line-height: 1.7;
}

.message:empty {
  display: none;
}

.message.error {
  color: #b44040;
  background: rgba(255, 100, 100, 0.12);
}

.message.success {
  color: #236842;
  background: rgba(88, 204, 131, 0.15);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.schedule-head {
  margin-bottom: 22px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 18px;
}

.event-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.80), rgba(246, 255, 246, 0.70));
  box-shadow: 0 22px 40px rgba(38, 96, 55, 0.15);
}

.event-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 247, 179, 0.18), rgba(154, 227, 145, 0.08));
  pointer-events: none;
}

.event-top,
.event-middle,
.event-bottom {
  position: relative;
  z-index: 1;
  padding: 20px 20px 18px;
}

.event-middle,
.event-bottom {
  border-top: 1px solid rgba(51, 112, 66, 0.08);
}

.event-date {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.16;
  color: #1b4f37;
  letter-spacing: 0.02em;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.event-detail {
  font-size: 22px;
  line-height: 1.75;
  color: #1f432e;
  /* JS 里已把换行转成 <br>；这里用 normal 避免 pre-wrap 在大字号时影响断行 */
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.address-pill-desktop,
.address-pill-mobile {
  min-height: 68px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(60, 125, 73, 0.10);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.address-pill-desktop {
  display: flex;
  align-items: center;
  padding: 8px 8px 8px 18px;
  gap: 10px;
}

.address-pill-mobile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 8px 8px 18px;
  color: #173624;
  font-size: 22px;
  line-height: 1.5;
  word-break: break-word;
  overflow-wrap: anywhere;
  user-select: text;
  -webkit-user-select: text;
}

.address-text {
  flex: 1;
  min-width: 0;
  font-size: 22px;
  line-height: 1.45;
  color: #173624;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.copy-icon-btn {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: rgba(249, 251, 250, 0.98);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(36, 81, 46, 0.10);
}

.copy-icon-btn svg {
  width: 24px;
  height: 24px;
  stroke: #21382a;
  stroke-width: 2;
  fill: none;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 18px;
}

.manage-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.manage-item {
  padding: 15px;
  border-radius: 18px;
  border: 1px solid rgba(32, 48, 42, 0.08);
  background: rgba(255, 255, 255, 0.82);
}

.manage-item-title {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 8px;
  color: #1b4f37;
}

.manage-item-meta {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
  white-space: pre-wrap;
}

.manage-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.grid-password {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 14px;
  /* 大字号时减少底对齐造成的挤压错位 */
  align-items: start;
}

.align-end {
  justify-content: end;
}

.empty-state {
  padding: 28px;
  border: 1px dashed rgba(43, 101, 58, 0.18);
  border-radius: 20px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.66);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(24, 63, 38, 0.92);
  color: #fff;
  font-size: 14px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.22);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.login-btn-wrap {
  display: flex;
  justify-content: center;
}

@media (max-width: 900px) {
  .grid-2,
  .grid-password {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .shell {
    padding: 16px 12px 30px;
  }

  /* 手机端使用专门裁切后的背景图，红旗位于中部偏右 */
  .shell::before {
    background:
      linear-gradient(180deg, rgba(255, 249, 214, 0.24), rgba(236, 255, 236, 0.28)),
      url('./images/sunny-golf-bg-mobile.jpg') center / cover no-repeat,
      url('./images/golf-course-bg.svg') center / cover no-repeat;
  }

  .login-panel {
    width: min(430px, calc(100% - 24px));
    margin: clamp(18px, 6vh, 40px) auto;
    padding: 24px;
  }

  .section-head {
    align-items: center;
  }

  .section-title {
    font-size: 24px;
  }

  .event-top,
  .event-middle,
  .event-bottom {
    padding: 18px 16px;
  }

  .event-date {
    font-size: 28px;
  }

  .event-detail {
    font-size: 18px;
    line-height: 1.72;
  }

  .address-pill-mobile {
    min-height: 58px;
    padding: 10px 10px 10px 16px;
    font-size: 18px;
  }
}