/* 밀레의 아늑한 어항 — 홈페이지 (시안 기준) */
#screen-site {
  padding: 0;
  align-items: flex-start;
  background: linear-gradient(180deg, #bfe6fb 0, #e4f5ff 220px, #effaf1 640px, #e8f6ea 100%);
}
.site { width: 100%; min-height: 100%; display: flex; flex-direction: column; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── 머리말 ── */
.site-head {
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 14px;
  padding: 10px 18px 8px; max-width: 1680px; width: 100%; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 4px; text-decoration: none; color: var(--ink); }
.brand canvas { width: 72px; height: 72px; }
.brand-text { display: flex; flex-direction: column; line-height: 1; font-family: var(--font-title); }
.brand-text b { font-weight: 400; color: #23406e; -webkit-text-stroke: 5px #fff; paint-order: stroke fill; }
.brand-text .b1 { font-size: 22px; margin-left: 6px; }
.brand-text .b2 { font-size: 38px; letter-spacing: -1px; }
.brand-text small { font-family: var(--font-body); font-size: 12px; color: #23406e; margin-top: 4px; -webkit-text-stroke: 3px #fff; paint-order: stroke fill; }

.site-nav {
  display: flex; gap: 2px; background: #fff; border-radius: 14px; padding: 5px; justify-self: center;
  box-shadow: 0 3px 0 rgba(35, 64, 110, .12), 0 6px 18px rgba(35, 64, 110, .1); flex-wrap: wrap;
}
.site-nav a {
  display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 10px; text-decoration: none;
  color: var(--ink); font-family: var(--font-title); font-size: 16px; white-space: nowrap;
}
.site-nav a:hover { background: #eef7ee; }
.site-nav a.on { background: #3f9a5a; color: #fff; box-shadow: inset 0 -3px 0 rgba(0,0,0,.15); }
.site-nav i { font-style: normal; display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center; }
.site-nav i img { max-width: 24px; max-height: 24px; }

.me-box {
  position: relative; display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 14px; padding: 5px 8px 5px 6px;
  box-shadow: 0 3px 0 rgba(35, 64, 110, .12), 0 6px 18px rgba(35, 64, 110, .1);
}
.me-box canvas { width: 44px; height: 44px; }
.me-info { display: flex; flex-direction: column; line-height: 1.2; }
.me-info b { font-family: var(--font-title); font-weight: 400; font-size: 17px; }
.me-info small { font-size: 11px; color: var(--ink-soft); }
.me-coins { display: flex; align-items: center; gap: 5px; padding-left: 10px; border-left: 2px solid var(--line); font-family: var(--font-title); }
.me-coins b { font-weight: 400; font-size: 17px; }
.me-coins span { font-size: 14px; }
.gear { width: 36px; height: 36px; border-radius: 10px; border: 2px solid var(--line); background: #f6f9ff; font-size: 18px; cursor: pointer; }
.me-menu { position: absolute; top: calc(100% + 6px); right: 0; background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 6px; box-shadow: var(--shadow); z-index: 10; display: flex; flex-direction: column; min-width: 150px; }
.me-menu button { border: 0; background: none; text-align: left; padding: 9px 12px; border-radius: 10px; font-family: var(--font-title); font-size: 15px; cursor: pointer; }
.me-menu button:hover { background: var(--pink-soft); }

.start-btn {
  border: 0; border-radius: 14px; padding: 14px 22px; cursor: pointer; color: #fff; font-family: var(--font-title); font-size: 22px;
  background: linear-gradient(#5ccb6c, #3aa84f); box-shadow: 0 4px 0 #24803a, 0 8px 18px rgba(36, 128, 58, .3); text-shadow: 0 2px 0 rgba(0,0,0,.15);
}
.start-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #24803a; }

/* ── 본문 ── */
.page { width: 100%; max-width: 1680px; margin: 0 auto; padding: 0 16px 16px; flex: 1; }
/* 시안 배너를 양옆이 잘리지 않게 원래 비율 그대로 */
.hero {
  aspect-ratio: 1672 / 160; margin: 0 -16px 14px; background: #bfe6fb center / 100% 100% no-repeat;
  -webkit-mask-image: linear-gradient(transparent 0, #000 26px); mask-image: linear-gradient(transparent 0, #000 26px);
}
.panel { background: #fff; border-radius: 18px; border: 3px solid #cfe9d5; box-shadow: 0 4px 0 rgba(35, 64, 110, .08), 0 10px 26px rgba(35, 64, 110, .08); padding: 14px; min-width: 0; }
.ph { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-family: var(--font-title); font-weight: 400; font-size: 21px; }
.ph small { font-family: var(--font-body); font-size: 12px; color: var(--ink-soft); display: block; }
.ph .titles { display: flex; flex-direction: column; line-height: 1.15; }
.ph .more { margin-left: auto; border: 2px solid var(--line); background: #fff; border-radius: 10px; padding: 3px 10px; font-family: var(--font-body); font-size: 12px; cursor: pointer; text-decoration: none; color: var(--ink); white-space: nowrap; }
.ico { width: 34px; height: 34px; object-fit: contain; flex: none; }
.ico.emoji { font-size: 26px; display: inline-flex; align-items: center; justify-content: center; }

.home { display: grid; grid-template-columns: 220px 1fr; gap: 14px; }
.home-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.home-row1 { display: grid; grid-template-columns: 1.05fr 1fr 0.86fr; gap: 14px; }
.home-row2 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

/* 게임 메뉴 */
.menu-panel { display: flex; flex-direction: column; gap: 8px; border-color: #cfe9d5; }
.menu-item { display: flex; align-items: center; gap: 10px; border: 2px solid #e6efe6; background: #fff; border-radius: 14px; padding: 8px 10px; cursor: pointer; text-align: left; }
.menu-item:hover { border-color: #8fd3a8; background: #f6fcf7; }
.menu-item .ico { width: 44px; height: 44px; }
.menu-item b { display: block; font-family: var(--font-title); font-weight: 400; font-size: 17px; }
.menu-item small { color: var(--ink-soft); font-size: 12px; display: block; line-height: 1.35; }
.cat-note { margin-top: auto; border: 2px dashed #9fd8b2; border-radius: 14px; padding: 12px; position: relative; min-height: 120px; background: #fbfffb; }
.cat-note p { margin: 0; font-size: 13px; line-height: 1.6; text-align: center; font-family: var(--font-body); }
.cat-note canvas { position: absolute; left: 4px; bottom: 2px; width: 56px; height: 56px; }

/* 낚시터 카드 */
.spot { display: flex; flex-direction: column; gap: 8px; }
.spot.fresh { border-color: #8fd3a0; background: linear-gradient(#f1fbf2, #fff 120px); }
.spot.sea { border-color: #8cc4ef; background: linear-gradient(#eef7ff, #fff 120px); }
.spot.plaza { border-color: #f0c98a; background: linear-gradient(#fff6e6, #fff 120px); }
.spot-head { display: flex; align-items: center; gap: 8px; }
.spot-head h2 { margin: 0; font-family: var(--font-title); font-weight: 400; font-size: 30px; }
.spot-head q { margin-left: auto; font-size: 12px; color: var(--ink-soft); text-align: right; max-width: 160px; line-height: 1.4; }
.spot-desc { margin: 0; font-size: 14px; }
.spot-img { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 512 / 236; background: #cfe9f9 center / cover no-repeat; border: 2px solid rgba(0,0,0,.06); }
.spot-count { position: absolute; left: 10px; top: 10px; background: rgba(255,255,255,.92); border-radius: 10px; padding: 2px 10px; font-family: var(--font-title); font-size: 14px; }
.spot-btn { border: 0; border-radius: 12px; padding: 12px; color: #fff; font-family: var(--font-title); font-size: 19px; cursor: pointer; }
.spot.fresh .spot-btn { background: linear-gradient(#4fb065, #3a9150); box-shadow: 0 4px 0 #2a6f3c; }
.spot.sea .spot-btn { background: linear-gradient(#4c95dc, #3478c0); box-shadow: 0 4px 0 #245a96; }
.spot.plaza .spot-btn { background: linear-gradient(#f0b04a, #d8922a); box-shadow: 0 4px 0 #a86a1a; }
/* 여름 저수지 · 가을 계곡 · 겨울 호수 */
.spot.summer { border-color: #7fcfb0; background: linear-gradient(#ecfaf3, #fff 120px); }
.spot.summer .spot-btn { background: linear-gradient(#36b08a, #24906c); box-shadow: 0 4px 0 #1a6e52; }
.spot.river { border-color: #f0b07a; background: linear-gradient(#fff3e8, #fff 120px); }
.spot.river .spot-btn { background: linear-gradient(#e8894a, #c96a2e); box-shadow: 0 4px 0 #9a4e1e; }
.spot.winter { border-color: #a9c8ee; background: linear-gradient(#f2f7ff, #fff 120px); }
.spot.winter .spot-btn { background: linear-gradient(#7aa6dc, #5a86c0); box-shadow: 0 4px 0 #3f6496; }
.recent-grid .rc.epic { border-color: #f3cf7a; background: #fffaf0; }
.spot-btn:active { transform: translateY(3px); box-shadow: none; }
.spot-btn:disabled { filter: grayscale(.8); opacity: .6; cursor: not-allowed; }

/* 랭킹 */
.rank-panel { border-color: #bfe3c4; }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; background: #eef6ee; border-radius: 12px; padding: 4px; margin-bottom: 8px; }
.seg button { border: 0; background: transparent; border-radius: 9px; padding: 7px 4px; font-family: var(--font-title); font-size: 15px; cursor: pointer; color: var(--ink); }
.seg button.on { background: #3f9a5a; color: #fff; }
.rank-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rank-table th { font-weight: 400; color: var(--ink-soft); font-size: 12px; text-align: left; padding: 4px 4px; border-bottom: 2px solid #eef3ee; }
.rank-table td { padding: 3px 4px; border-bottom: 1px dashed #eef3ee; vertical-align: middle; }
.rank-table tr.me td { background: #fff7d6; }
.rank-table .no { width: 30px; text-align: center; font-family: var(--font-title); }
.rank-table .no img { width: 22px; height: 20px; vertical-align: middle; }
.rank-table .who { display: flex; align-items: center; gap: 6px; font-family: var(--font-title); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-table .who canvas { width: 26px; height: 26px; flex: none; }
.rank-table canvas.rod { width: 48px; height: 20px; }
.rank-table .num { text-align: right; font-family: var(--font-title); }
.empty-note { text-align: center; color: var(--ink-soft); padding: 22px 6px; font-size: 14px; }

/* 아래 줄 */
.mission-panel { border-color: #bcdcf5; }
.event-panel { border-color: #f5c6d3; }
.recent-panel { border-color: #bcdcf5; }
.notice-panel { border-color: #f3d7b4; }
.mission { display: grid; grid-template-columns: 22px 1fr auto auto; align-items: center; gap: 8px; padding: 6px 2px; border-bottom: 1px dashed #e8eef5; font-size: 13px; }
.mission .box { width: 18px; height: 18px; border: 2px solid #b8c6d4; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; }
.mission.done .box { background: #3f9a5a; border-color: #3f9a5a; }
.mission.claimed { opacity: .55; }
.mission .prog { color: var(--ink-soft); font-family: var(--font-title); }
.mission .rew { display: inline-flex; align-items: center; gap: 3px; font-family: var(--font-title); }
.mission .rew .coin-icon { width: 16px; height: 16px; }
.claim { border: 0; background: var(--gold); color: #fff; border-radius: 8px; padding: 3px 8px; font-family: var(--font-title); cursor: pointer; box-shadow: 0 2px 0 var(--gold-deep); }
.mission-reset { font-size: 11px; color: var(--ink-soft); margin: 6px 0 0; text-align: right; }

.banner { position: relative; border-radius: 14px; padding: 12px 14px; min-height: 76px; overflow: hidden; margin-bottom: 8px; cursor: pointer; display: block; text-decoration: none; color: inherit; }
.banner.pink { background: linear-gradient(110deg, #ffe0ea, #fff4f7 60%, #ffd5e3); }
.banner.blue { background: linear-gradient(110deg, #3d86d8, #6fb4ef); color: #fff; }
.banner b { font-family: var(--font-title); font-weight: 400; font-size: 20px; display: block; }
.banner.pink b { color: #e0577a; }
.banner p { margin: 4px 0 0; font-size: 12px; max-width: 64%; white-space: pre-line; max-height: 3.2em; overflow: hidden; }
.banner canvas, .banner img { position: absolute; right: 8px; bottom: 4px; width: 64px; height: 64px; object-fit: contain; }

.recent-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.recent-grid .rc { border: 2px solid #eef3f8; border-radius: 12px; padding: 4px; text-align: center; background: #f9fbfe; font-family: var(--font-title); font-size: 13px; }
.recent-grid img { width: 100%; height: 40px; object-fit: contain; }

.notice-list { list-style: none; margin: 0; padding: 0; }
.notice-list li a { display: flex; align-items: center; gap: 8px; padding: 6px 2px; border-bottom: 1px dashed #f1e6d8; text-decoration: none; color: var(--ink); font-size: 13px; }
.notice-list li a span.t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { flex: none; font-family: var(--font-title); font-size: 12px; color: #fff; border-radius: 6px; padding: 1px 8px; background: #8a96a6; }
.tag.중요 { background: #e5576b; }
.tag.이벤트 { background: #3f8fe0; }
.tag.안내 { background: #7a8696; }

/* 하위 페이지 공통 */
.sub-head { display: flex; align-items: center; gap: 10px; margin: 16px 0 12px; }
.sub-head h2 { margin: 0; font-family: var(--font-title); font-weight: 400; font-size: 28px; }
.sub-head p { margin: 0; color: var(--ink-soft); font-size: 14px; }
.sub-head .actions { margin-left: auto; display: flex; gap: 6px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { font-weight: 400; color: var(--ink-soft); text-align: left; padding: 8px; border-bottom: 2px solid #eef1f5; font-size: 13px; }
.table td { padding: 8px; border-bottom: 1px solid #f0f2f6; vertical-align: middle; }
.table tr.link { cursor: pointer; }
.table tr.link:hover td { background: #f7fbff; }
.table .fishcell { display: flex; align-items: center; gap: 8px; font-family: var(--font-title); }
.table .fishcell img { width: 64px; height: 30px; object-fit: contain; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { background: #f3f7fb; border: 2px solid #e3ebf3; border-radius: 10px; padding: 3px 10px; font-family: var(--font-title); font-size: 14px; }

/* 수족관 */
.tank-wrap { border-radius: 22px; overflow: hidden; border: 6px solid #9cc7e8; box-shadow: var(--shadow); background: #2d7fc8; }
.aqua-locked { text-align: center; padding: 40px 20px; }
.aqua-locked .lock { font-size: 46px; }
.aqua-locked h3 { font-family: var(--font-title); font-weight: 400; font-size: 22px; margin: 8px 0; }
.aqua-locked p { color: var(--ink-soft); line-height: 1.6; margin: 0 0 16px; }
.aqua-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.aqua-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; font-family: var(--font-title); }
#tank { display: block; width: 100%; height: 440px; }

/* 게시판 */
.board-table td.title { font-family: var(--font-title); font-size: 15px; }
.board-table td.title em { font-style: normal; color: #e0577a; font-size: 13px; margin-left: 4px; }
.board-table .who { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.board-table .who canvas { width: 24px; height: 24px; }
.pager { display: flex; gap: 4px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.pager button { min-width: 34px; border: 2px solid var(--line); background: #fff; border-radius: 9px; padding: 4px 8px; cursor: pointer; font-family: var(--font-title); }
.pager button.on { background: #3f9a5a; border-color: #3f9a5a; color: #fff; }
.form-panel label { display: block; font-family: var(--font-title); margin-bottom: 10px; }
.form-panel input, .form-panel textarea, .form-panel select {
  display: block; width: 100%; margin-top: 4px; padding: 10px 12px; border: 2px solid var(--line); border-radius: 12px; font-family: var(--font-body); font-size: 15px; background: #fff; outline: none;
}
.form-panel textarea { min-height: 220px; resize: vertical; line-height: 1.6; }
.form-panel input:focus, .form-panel textarea:focus { border-color: var(--pink); }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.form-actions .count { margin-right: auto; font-size: 12px; color: var(--ink-soft); }
.post-head { border-bottom: 2px solid #f0f2f6; padding-bottom: 10px; margin-bottom: 12px; }
.post-head h3 { margin: 0 0 6px; font-family: var(--font-title); font-weight: 400; font-size: 24px; word-break: break-all; }
.post-meta { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 13px; flex-wrap: wrap; }
.post-meta canvas { width: 28px; height: 28px; }
.post-meta b { color: var(--ink); font-family: var(--font-title); font-weight: 400; font-size: 15px; }
.post-body { white-space: pre-wrap; word-break: break-all; line-height: 1.7; font-size: 15px; min-height: 100px; }
.comments { margin-top: 18px; border-top: 2px solid #f0f2f6; padding-top: 10px; }
.comment { display: grid; grid-template-columns: 30px 1fr auto; gap: 8px; padding: 8px 0; border-bottom: 1px dashed #eef1f5; }
.comment canvas { width: 30px; height: 30px; }
.comment b { font-family: var(--font-title); font-weight: 400; }
.comment small { color: var(--ink-soft); margin-left: 6px; }
.comment p { margin: 2px 0 0; white-space: pre-wrap; word-break: break-all; font-size: 14px; }
.comment-form { display: flex; gap: 8px; margin-top: 10px; }
.comment-form input { flex: 1; padding: 10px 12px; border: 2px solid var(--line); border-radius: 12px; font-size: 15px; font-family: var(--font-body); }
.link-btn { border: 0; background: none; color: #c0485e; cursor: pointer; font-size: 12px; }

a.btn { text-decoration: none; color: var(--ink); display: inline-flex; align-items: center; }
a.btn.primary { color: #fff; }

/* 꼬리말 */
.site-foot { text-align: center; font-size: 12px; color: #4a6380; padding: 18px 16px 16px; margin-top: 10px; background: linear-gradient(transparent, #cfeaf8); }
.site-foot p { margin: 2px 0; }
.foot-mode { color: #2f7a4a; }

/* ── 화면 크기별 ── */
@media (max-width: 1500px) {
  .site-head { grid-template-columns: auto 1fr auto; }
  .site-head .me-box { justify-self: end; }
}
@media (max-width: 1360px) {
  .site-nav { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; justify-content: center; }
  .home-row1 { grid-template-columns: 1fr 1fr; }
  .rank-panel { grid-column: 1 / -1; }
  .home-row2 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .home { grid-template-columns: 1fr; }
  .menu-panel { display: grid; grid-template-columns: repeat(3, 1fr); }
  .menu-panel .ph, .cat-note { grid-column: 1 / -1; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .site-head { grid-template-columns: 1fr auto; gap: 8px; padding: 8px 10px; }
  .brand canvas { width: 48px; height: 48px; }
  .brand-text .b2 { font-size: 26px; }
  .brand-text .b1 { font-size: 16px; }
  .brand-text small { display: none; }
  .me-box { grid-column: 1 / -1; grid-row: 3; justify-self: stretch; }
  .me-coins span { display: none; }
  .start-btn { padding: 10px 14px; font-size: 18px; }
  .site-nav a { padding: 7px 9px; font-size: 14px; }
  .site-nav i { width: 20px; height: 20px; }
  .hero { aspect-ratio: auto; height: 96px; background-size: cover; }
  .home-row1, .home-row2 { grid-template-columns: 1fr; }
  .menu-panel { grid-template-columns: 1fr 1fr; }
  .spot-head h2 { font-size: 24px; }
  #tank { height: 300px; }
  .table .hide-sm { display: none; }
}

/* 계정 관리 (⚙ → 🔐 계정 관리) */
.account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.account-grid .form-panel label { display: block; margin-top: 8px; }
.acc-state { padding: 8px 12px; border-radius: 12px; margin: 6px 0; }
.acc-state.ok { background: #eaf8ee; border: 2px solid #b9e4c5; }
.acc-state.warn { background: #fff4e6; border: 2px solid #f3d3a5; }
.sub-form { margin-top: 14px; padding-top: 10px; border-top: 2px dashed var(--line); }
.sub-form h4 { margin: 0; font-family: var(--font-title); font-weight: 400; }
.form-panel.danger { border-color: #f1c4c4; }
.warn-list { margin: 6px 0 4px; padding-left: 18px; }
.btn.danger-btn { background: #e8686a; border-color: #c94b4e; color: #fff; box-shadow: 0 3px 0 #c94b4e; }
.email-banner { display: block; margin: 10px 0; padding: 10px 14px; border-radius: 14px; background: #fff4e6; border: 2px solid #f3d3a5; color: var(--ink); text-decoration: none; font-size: 14px; }
.email-banner:hover { background: #ffecd2; }
