:root {
  --green:#0F473C;
  --green-deep:#0A352D;
  --green-soft:#DDEAE5;
  --cream:#F3F0E7;
  --paper:#FFFDF8;
  --orange:#F25D3A;
  --ink:#121715;
  --muted:#68716C;
  --line:#DEE3DF;
  --white:#FFFFFF;
  --shadow:0 12px 30px rgba(10,53,45,.10);
}

*{box-sizing:border-box}
html{background:var(--cream)}
body{
  margin:0;
  min-width:320px;
  color:var(--ink);
  background:linear-gradient(180deg,#fff 0,#f5f3ec 170px,var(--cream) 100%);
  font-family:Pretendard,-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans KR",Roboto,Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
}
button,input,textarea,select{font:inherit}
button{cursor:pointer}
button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{
  outline:3px solid rgba(15,71,60,.22);
  outline-offset:2px;
}
.hidden{display:none!important}
.app-shell{width:min(100%,720px);min-height:100vh;margin:0 auto;background:var(--cream)}

.topbar{
  position:sticky;top:0;z-index:30;
  min-height:76px;
  padding:max(12px,env(safe-area-inset-top)) 16px 12px;
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  background:rgba(15,71,60,.98);
  box-shadow:0 8px 25px rgba(10,53,45,.18)
}
.brand{display:flex;align-items:center;gap:11px;min-width:0}
.brand-logo{width:60px;height:46px;border-radius:9px;overflow:hidden;flex:0 0 auto}
.brand-logo img{width:100%;height:100%;object-fit:cover}
.brand-copy strong{display:block;color:#fff;font-size:17px;font-weight:950;letter-spacing:.055em}
.brand-copy span{display:block;margin-top:2px;color:rgba(255,255,255,.68);font-size:9px;font-weight:800;letter-spacing:.13em}
.manage-btn{
  min-height:40px;padding:0 13px;border:1px solid rgba(255,255,255,.34);border-radius:11px;
  background:rgba(255,255,255,.08);color:#fff;font-size:13px;font-weight:900
}
.manage-btn:hover{background:rgba(255,255,255,.15)}

.view-tabs{
  position:sticky;top:76px;z-index:22;
  display:grid;grid-template-columns:1fr 1fr;
  padding:8px 10px 0;
  background:rgba(243,240,231,.96);
  border-bottom:1px solid rgba(15,71,60,.10);
  backdrop-filter:blur(10px)
}
.view-tab{
  min-height:43px;border:0;border-bottom:3px solid transparent;background:transparent;color:#7A837E;
  font-size:14px;font-weight:900
}
.view-tab.active{border-bottom-color:var(--green);color:var(--green-deep)}

main{padding-bottom:calc(32px + env(safe-area-inset-bottom))}
.date-panel{padding:19px 16px 13px;background:var(--paper);border-bottom:1px solid rgba(15,71,60,.12)}
.date-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px}
.eyebrow{margin:0 0 4px;color:var(--green);font-size:12px;font-weight:950;letter-spacing:.03em}
.date-head h1,.week-heading h1{margin:0;font-size:clamp(23px,7vw,32px);line-height:1.1;letter-spacing:-.045em}
.ghost-btn{
  padding:8px 11px;border:1px solid rgba(15,71,60,.22);border-radius:10px;background:#fff;color:var(--green);
  font-size:12px;font-weight:900
}
.date-strip{display:flex;gap:9px;margin-top:17px;padding:2px 1px 6px;overflow-x:auto;scrollbar-width:none;scroll-snap-type:x proximity}
.date-strip::-webkit-scrollbar{display:none}
.date-btn{width:53px;flex:0 0 auto;border:0;background:transparent;text-align:center;scroll-snap-align:center}
.date-num{
  display:grid;place-items:center;width:43px;height:43px;margin:0 auto;border:2px solid #AFC6BE;border-radius:50%;
  background:#fff;color:var(--green);font-size:15px;font-weight:900;transition:.18s ease
}
.date-day{display:block;margin-top:5px;color:#8A918D;font-size:10px;font-weight:800}
.date-btn.active .date-num{border-color:var(--green);background:var(--green);color:#fff;box-shadow:0 6px 14px rgba(15,71,60,.24)}
.date-btn.active .date-day{color:var(--green-deep);font-weight:950}

.viewer-section,.admin-section{padding:14px 10px 28px}
.wod-card,.detail-sheet,.admin-card{
  border:1px solid rgba(15,71,60,.14);border-radius:17px;background:#fff;box-shadow:var(--shadow);overflow:hidden
}
.wod-card{position:relative}
.accent-bar{position:absolute;inset:0 auto 0 0;width:7px;background:var(--green)}
.wod-card-inner{padding:18px 16px 17px 22px}
.program-chip{
  display:inline-block;padding:5px 8px;border-radius:6px;background:var(--green);color:#fff;
  font-size:10px;font-weight:950;letter-spacing:.09em
}
.wod-title{margin:9px 0 0;font-size:22px;font-weight:950;letter-spacing:-.04em}
.wod-preview{margin-top:17px}
.preview-block+.preview-block{margin-top:14px;padding-top:14px;border-top:1px dashed rgba(15,71,60,.14)}
.preview-label{display:flex;gap:8px;align-items:baseline;font-size:16px;font-weight:950}
.preview-label .mark{color:var(--orange)}
.preview-text{margin:7px 0 0;white-space:pre-wrap;color:#343B37;font-size:15px;line-height:1.58}

.primary-btn,.secondary-btn,.danger-btn,.outline-btn{
  border:0;border-radius:11px;font-weight:950;min-height:47px
}
.primary-btn{background:var(--green);color:#fff;box-shadow:0 7px 17px rgba(15,71,60,.22)}
.primary-btn:hover{background:var(--green-deep)}
.secondary-btn{background:var(--green-soft);color:var(--green-deep)}
.danger-btn{background:#FBE3DE;color:#A43824}
.outline-btn{border:1px solid #CED9D4;background:#fff;color:var(--green)}
.full-btn{display:block;margin:20px auto 0;padding:0 20px}
.empty-state{padding:52px 20px;border:1px dashed rgba(15,71,60,.25);border-radius:17px;background:var(--paper);text-align:center}
.empty-icon{font-size:35px}
.empty-state h2{margin:12px 0 6px;font-size:20px}
.empty-state p{margin:0;color:var(--muted);font-size:13px}

.detail-sheet{margin-top:12px;background:var(--paper)}
.detail-head{
  position:sticky;top:119px;z-index:12;display:flex;align-items:flex-start;justify-content:space-between;gap:12px;
  padding:17px;border-bottom:1px solid var(--line);background:rgba(255,253,248,.97);backdrop-filter:blur(10px)
}
.detail-head h2{margin:8px 0 0;font-size:21px;letter-spacing:-.035em}
.close-btn{width:37px;height:37px;border:0;border-radius:10px;background:var(--green-soft);color:var(--green-deep);font-size:25px;line-height:1}
.detail-content{padding:14px}
.detail-block{padding:17px;border:1px solid rgba(15,71,60,.09);border-radius:13px;background:#fff}
.detail-block+.detail-block{margin-top:12px}
.detail-block h3{margin:0 0 10px;color:var(--orange);font-size:17px;font-weight:950;line-height:1.4}
.detail-text{margin:0;white-space:pre-wrap;font-size:clamp(16px,4.8vw,20px);line-height:1.55;word-break:keep-all}
.detail-bottom-btn{width:calc(100% - 28px);margin:0 14px 15px}

.weekly-view{padding:18px 10px 28px}
.week-toolbar{display:grid;grid-template-columns:44px 1fr 44px;align-items:center;gap:9px;padding:4px 2px 12px}
.week-heading{text-align:center}
.week-heading h1{font-size:23px}
.week-nav-btn{
  width:44px;height:44px;border:1px solid rgba(15,71,60,.18);border-radius:12px;background:#fff;color:var(--green);
  font-size:28px;line-height:1;font-weight:700;box-shadow:0 5px 14px rgba(10,53,45,.06)
}
.week-nav-btn.small{width:38px;height:38px;font-size:24px}
.week-subbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 2px 12px}
.week-subbar span{color:var(--muted);font-size:11px;font-weight:800}
.week-cards{display:flex;flex-direction:column;gap:10px}
.week-card{
  position:relative;width:100%;padding:0;border:1px solid rgba(15,71,60,.13);border-radius:15px;background:#fff;text-align:left;
  box-shadow:0 8px 22px rgba(10,53,45,.07);overflow:hidden
}
.week-card.today{border:2px solid var(--green)}
.week-card.has-wod:hover{border-color:rgba(15,71,60,.36)}
.week-card-inner{display:grid;grid-template-columns:66px 1fr;min-height:124px}
.week-date-cell{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:12px 8px;background:#F6F7F3;border-right:1px solid var(--line)}
.week-card.today .week-date-cell{background:var(--green-soft)}
.week-day{font-size:13px;font-weight:950;color:var(--green-deep)}
.week-date{margin-top:4px;font-size:24px;font-weight:950;letter-spacing:-.04em}
.today-badge{margin-top:5px;padding:2px 6px;border-radius:999px;background:var(--green);color:#fff;font-size:9px;font-weight:950}
.week-content{padding:14px 14px 13px;min-width:0}
.week-status{display:flex;align-items:center;gap:7px;margin-bottom:7px}
.week-status-dot{width:7px;height:7px;border-radius:50%;background:#B7C1BC}
.week-card.has-wod .week-status-dot{background:var(--orange)}
.week-status span{color:var(--muted);font-size:10px;font-weight:900;letter-spacing:.03em}
.week-content h3{margin:0;font-size:16px;line-height:1.35;letter-spacing:-.02em}
.week-snippet{margin:7px 0 0;color:#48514C;font-size:13px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}
.week-open-hint{display:inline-block;margin-top:9px;color:var(--green);font-size:11px;font-weight:950}
.week-empty-text{margin:2px 0 0;color:#909792;font-size:13px}

.admin-card{padding:17px;background:var(--paper)}
.admin-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.admin-head h2{margin:2px 0 0;font-size:22px;letter-spacing:-.04em}
.admin-tabs{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:15px 0}
.admin-tab{min-height:42px;border:1px solid #D5DDD9;border-radius:11px;background:#fff;color:#6D7771;font-size:13px;font-weight:900}
.admin-tab.active{border-color:var(--green);background:var(--green);color:#fff}
.security-note{margin:0 0 14px;padding:11px 12px;border:1px solid #C8DAD4;border-radius:11px;background:var(--green-soft);color:var(--green-deep);font-size:12px;line-height:1.55}
.quick-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:15px}
.quick-actions button{min-height:42px}
.field{display:block;margin-bottom:13px}
.field span{display:block;margin-bottom:6px;color:var(--green-deep);font-size:12px;font-weight:900}
.field input,.field textarea,.field select{width:100%;border:1px solid #D4DCD8;border-radius:11px;background:#fff;color:var(--ink)}
.field input,.field select{height:44px;padding:0 11px}
.field textarea{padding:11px 12px;line-height:1.58;resize:vertical}
.form-grid{display:grid;grid-template-columns:1fr;gap:10px}
.editor-title-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:19px 0 10px}
.editor-title-row strong{font-size:15px}
.editor-title-row small{display:block;margin-top:2px;color:var(--muted);font-size:11px}
.block-editors{display:flex;flex-direction:column;gap:11px}
.block-editor{padding:12px;border:1px solid rgba(15,71,60,.13);border-radius:13px;background:#F8F8F5}
.block-top{display:flex;align-items:center;gap:7px;margin-bottom:10px}
.block-type{flex:1;height:39px!important;margin:0!important;padding:0 9px;border:1px solid #D4DCD8;border-radius:9px;background:#fff;color:var(--ink)}
.mini-btn{width:36px;height:36px;border:1px solid #D6DDD9;border-radius:9px;background:#fff;color:#52605A;font-weight:950}
.mini-btn.delete{color:#A43824;background:#FFF4F1}
.block-editor .field:last-child{margin-bottom:0}
.add-block-btn{width:100%;margin-top:10px}
.live-preview-section{margin-top:18px;padding-top:16px;border-top:1px solid var(--line)}
.live-preview-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:9px}
.live-preview-head strong{font-size:14px}
.live-preview-head span{color:var(--muted);font-size:11px}
.live-preview-card{padding:14px;border:1px solid rgba(15,71,60,.13);border-radius:13px;background:#fff}
.live-preview-card h3{margin:0 0 11px;font-size:18px}
.live-block+.live-block{margin-top:11px;padding-top:11px;border-top:1px dashed rgba(15,71,60,.13)}
.live-label{color:var(--orange);font-size:13px;font-weight:950}
.live-text{margin:5px 0 0;white-space:pre-wrap;color:#343B37;font-size:13px;line-height:1.5}
.live-empty{color:#8A918D}
.form-actions{display:grid;grid-template-columns:1fr 1.35fr;gap:9px;margin-top:17px}
.form-actions .primary-btn{width:100%}

.admin-week-toolbar{display:grid;grid-template-columns:40px 1fr 40px;align-items:center;gap:8px;padding:3px 0 10px}
.admin-week-toolbar>div{text-align:center}
.admin-week-toolbar h3{margin:0;font-size:18px;letter-spacing:-.03em}
.admin-week-subbar{display:flex;justify-content:center;margin-bottom:10px}
.admin-week-list{display:flex;flex-direction:column;gap:8px}
.admin-day-row{display:grid;grid-template-columns:58px 1fr auto;align-items:center;gap:10px;padding:11px;border:1px solid rgba(15,71,60,.12);border-radius:12px;background:#fff}
.admin-day-row.today{border-color:var(--green);background:#F6FBF9}
.admin-day-date{text-align:center}
.admin-day-date strong{display:block;color:var(--green-deep);font-size:12px}
.admin-day-date span{display:block;margin-top:2px;font-size:19px;font-weight:950}
.admin-day-info{min-width:0}
.admin-day-info strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13px}
.admin-day-info span{display:block;margin-top:3px;color:var(--muted);font-size:11px}
.admin-day-edit{min-height:37px;padding:0 11px;border:1px solid #C9D6D0;border-radius:9px;background:#fff;color:var(--green);font-size:11px;font-weight:950}

.toast{position:fixed;left:50%;bottom:calc(20px + env(safe-area-inset-bottom));z-index:90;transform:translateX(-50%);max-width:calc(100% - 32px);padding:10px 14px;border-radius:999px;background:#111;color:#fff;font-size:12px;font-weight:800;opacity:0;pointer-events:none;transition:.2s}
.toast.show{opacity:1}

@media(min-width:640px){
  .app-shell{border-left:1px solid rgba(15,71,60,.11);border-right:1px solid rgba(15,71,60,.11);box-shadow:0 0 60px rgba(10,53,45,.09)}
  .topbar,.date-panel{padding-left:23px;padding-right:23px}
  .viewer-section,.admin-section,.weekly-view{padding-left:17px;padding-right:17px}
  .form-grid{grid-template-columns:1fr 1fr}
  .detail-text{font-size:18px}
  .week-cards{display:grid;grid-template-columns:1fr 1fr}
  .week-card-inner{min-height:142px}
}


/* v5: 온라인 공유 + 관리자 인증 */
.top-actions { display:flex; align-items:center; gap:.5rem; }
.connection-badge {
  display:inline-flex; align-items:center; min-height:1.9rem; padding:0 .62rem; border:1px solid rgba(255,255,255,.28);
  border-radius:999px; color:rgba(255,255,255,.84); font-size:.67rem; font-weight:850; white-space:nowrap;
}
.connection-badge.online { background:rgba(255,255,255,.14); color:#fff; }
.connection-badge.cached { background:rgba(251,191,36,.18); color:#fff2bf; }
.auth-card {
  border:1px solid rgba(15,71,60,.15); border-radius:17px; background:#fffdf8; box-shadow:var(--shadow); padding:1.1rem;
}
.auth-card h2 { margin:.1rem 0 0; font-size:1.35rem; letter-spacing:-.04em; }
.auth-help { margin:1rem 0; color:#64706a; font-size:.82rem; line-height:1.65; }
.login-form { margin-top:.8rem; }
.auth-login-btn { width:100%; margin-top:.25rem; }
.auth-security-note {
  margin-top:1rem; padding:.75rem .8rem; border:1px solid #dce6e2; border-radius:11px; background:#f4f8f6;
  color:#496058; font-size:.72rem; line-height:1.55;
}
.admin-head-actions { display:flex; align-items:center; gap:.45rem; }
.logout-btn {
  min-height:2.15rem; padding:0 .7rem; border:1px solid #d8e2de; border-radius:9px; background:#fff; color:#365247; font-size:.72rem; font-weight:850;
}
.primary-btn:disabled, .manage-btn:disabled, .logout-btn:disabled { opacity:.55; cursor:not-allowed; }
.network-error { color:#a43824; }

/* v5.1: 회원 화면은 선택한 날짜의 WOD를 바로 전체 표시 */
.member-full-text {
  margin-top: 9px;
  color: #202622;
  font-size: 16px;
  line-height: 1.62;
  white-space: pre-wrap;
  word-break: keep-all;
}
@media (max-width: 480px) {
  .member-full-text { font-size: 15.5px; line-height: 1.62; }
}

/* ===== v6 회원 로그인 · 기록 · 리더보드 ===== */
.member-top-btn {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 11px;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}
.member-top-btn:hover { background: rgba(255,255,255,.15); }
.member-area { margin-top: 14px; }
.member-card {
  border: 1px solid rgba(15,71,60,.14);
  border-radius: 17px;
  background: #fff;
  box-shadow: var(--shadow-card, 0 12px 30px rgba(10,53,45,.10));
  padding: 17px;
}
.member-card-title h2,
.record-form-head h3,
.leaderboard-head h3 { margin: 0; letter-spacing: -.035em; }
.member-help {
  margin: 9px 0 14px;
  color: #65706a;
  font-size: 13px;
  line-height: 1.55;
}
.social-login-grid { display: grid; gap: 8px; }
.social-btn {
  min-height: 46px;
  border: 1px solid #d9dfdc;
  border-radius: 11px;
  font-weight: 900;
}
.social-btn.google { background: #fff; color: #202124; }
.social-btn.kakao { background: #FEE500; color: #191919; border-color: #FEE500; }
.social-btn.naver { background: #03C75A; color: #fff; border-color: #03C75A; }
.social-btn:disabled { opacity: .38; cursor: not-allowed; filter: grayscale(.35); }
.member-privacy-line {
  margin: 11px 0 0;
  color: #7b837f;
  font-size: 11px;
  line-height: 1.5;
}
.member-privacy-line a { color: #0F473C; font-weight: 800; }
.member-head,
.leaderboard-head,
.record-form-head,
.member-identity,
.nickname-row,
.leader-name-line {
  display: flex;
  align-items: center;
}
.member-head,
.leaderboard-head,
.record-form-head { justify-content: space-between; gap: 12px; }
.member-identity { gap: 10px; min-width: 0; }
.member-initial {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #0F473C;
  color: #fff;
  font-weight: 950;
}
.member-identity strong { display: block; font-size: 15px; }
.member-identity span { display: block; margin-top: 2px; color: #7a837f; font-size: 11px; }
.member-logout-btn {
  border: 0;
  background: transparent;
  color: #7a837f;
  font-size: 11px;
  font-weight: 850;
}
.nickname-row { gap: 8px; margin-top: 14px; align-items: flex-end; }
.compact-field { flex: 1; margin-bottom: 0 !important; }
.nickname-save-btn { min-width: 64px; min-height: 44px; }
.member-info-box {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #d9e4df;
  border-radius: 11px;
  background: #eff6f3;
  color: #315247;
  font-size: 12px;
  line-height: 1.5;
}
.record-form,
.leaderboard-section { margin-top: 18px; padding-top: 17px; border-top: 1px solid #e2e7e4; }
.score-type-badge {
  padding: 5px 8px;
  border-radius: 999px;
  background: #e4efeb;
  color: #0F473C;
  font-size: 10px;
  font-weight: 950;
}
.score-input-grid { display: grid; gap: 8px; }
.score-input-grid.two { grid-template-columns: 1fr 1fr; }
.public-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 2px 0 14px;
  color: #56615c;
  font-size: 12px;
  font-weight: 800;
}
.public-toggle input { width: 17px; height: 17px; accent-color: #0F473C; }
.record-actions { display: grid; grid-template-columns: 1fr 1.35fr; gap: 9px; }
.record-actions .primary-btn,
.record-actions .danger-btn { width: 100%; }
.compact-btn { min-height: 36px; padding: 0 10px; font-size: 11px; }
.leaderboard-list { margin-top: 11px; }
.leaderboard-row {
  display: grid;
  grid-template-columns: 38px minmax(0,1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px 0;
  border-top: 1px solid #edf0ee;
}
.leaderboard-row:first-child { border-top: 0; }
.leaderboard-row.mine {
  margin: 0 -7px;
  padding-left: 7px;
  padding-right: 7px;
  border-radius: 10px;
  background: #f0f6f3;
}
.leader-rank { text-align: center; color: #66716c; font-size: 13px; font-weight: 950; }
.leader-info { min-width: 0; }
.leader-name-line { gap: 6px; flex-wrap: wrap; }
.leader-name-line strong { font-size: 13px; }
.division-badge,
.mine-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 950;
}
.division-badge { background: #f0eee8; color: #60594c; }
.mine-badge { background: #0F473C; color: #fff; }
.leader-note {
  display: block;
  margin-top: 3px;
  color: #858c88;
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.leader-result { color: #0F473C; font-size: 14px; white-space: nowrap; }
.leaderboard-empty {
  padding: 20px 10px;
  color: #7b837f;
  text-align: center;
  font-size: 12px;
}
.live-score-type {
  display: inline-block;
  margin: 0 0 10px;
  padding: 4px 7px;
  border-radius: 999px;
  background: #e4efeb;
  color: #0F473C;
  font-size: 10px;
  font-weight: 900;
}
@media (max-width: 430px) {
  .top-actions { gap: 5px; }
  .connection-badge { display: none; }
  .member-top-btn,
  .manage-btn { padding-left: 10px; padding-right: 10px; }
  .leaderboard-row { grid-template-columns: 32px minmax(0,1fr) auto; gap: 7px; }
}

/* privacy */
.privacy-body { background: #f4f1e8; }
.privacy-page { max-width: 760px; margin: 0 auto; padding: 28px 18px 60px; color: #18211d; }
.privacy-back { color: #0F473C; font-size: 13px; font-weight: 850; text-decoration: none; }
.privacy-page h1 { margin: 18px 0 24px; font-size: 30px; letter-spacing: -.045em; }
.privacy-page section { margin-top: 24px; padding: 19px; border: 1px solid #dfe5e1; border-radius: 14px; background: #fff; }
.privacy-page h2 { margin: 0 0 10px; font-size: 17px; }
.privacy-page p, .privacy-page li { color: #53605a; font-size: 13px; line-height: 1.72; }
.privacy-page ul { padding-left: 20px; }
.privacy-warning { padding: 15px; border: 1px solid #f1c4b8; border-radius: 13px; background: #fff1ec; }
.privacy-warning strong { color: #a43b27; }
.privacy-warning p { margin-bottom: 0; }


/* ===== v6.1 로그인 UI 정리 ===== */
/* 연결 상태는 내부 로직에 유지하되 일반 회원 헤더에는 표시하지 않음 */
.connection-badge-internal { display: none !important; }

.member-login-cta {
  width: 100%;
  margin-top: 13px;
}
.member-login-section { padding-top: 18px; }
.member-login-card {
  max-width: 560px;
  margin: 0 auto;
}
.member-login-providers { margin-top: 16px; }
.member-login-providers .social-btn {
  min-height: 50px;
  font-size: 14px;
}
.member-logged-out-card { padding-bottom: 18px; }

@media (max-width: 430px) {
  .member-login-card { border-radius: 15px; }
}


/* ===== v6.4 회원 프로필 온보딩 ===== */
.profile-setup-card {
  margin-top: 15px;
  padding: 16px;
  border: 1px solid #cfe0d9;
  border-radius: 14px;
  background: linear-gradient(180deg, #f4faf7 0%, #ffffff 100%);
}
.profile-setup-card h3 {
  margin: 2px 0 7px;
  color: #123f35;
  font-size: 18px;
  letter-spacing: -.03em;
}
.profile-setup-help {
  margin: 0 0 13px;
  color: #62716b;
  font-size: 12px;
  line-height: 1.55;
}
.profile-nickname-field { margin-bottom: 10px !important; }
.profile-complete-btn { width: 100%; }


/* ===== v7 WOD 기록 UI ===== */
.saved-record-summary {
  margin-top: 16px; padding: 15px; border: 1px solid #cfe0d9; border-radius: 14px;
  background: linear-gradient(180deg, #f2f8f5 0%, #ffffff 100%);
}
.saved-record-top,.saved-record-meta { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.saved-record-result { display:block; margin-top:3px; color:#0F473C; font-size:27px; line-height:1; letter-spacing:-.045em; }
.saved-record-division {
  display:inline-flex; align-items:center; justify-content:center; min-height:32px; padding:0 11px;
  border-radius:999px; background:#0F473C; color:#fff; font-size:11px; font-weight:950;
}
.saved-record-meta { margin-top:12px; color:#74807a; font-size:10px; font-weight:800; }
.saved-record-help { margin:9px 0 0; color:#62706a; font-size:11px; line-height:1.5; }

.division-segments { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px; }
.division-segment {
  min-height:42px; border:1px solid #d5ded9; border-radius:10px; background:#fff;
  color:#65716b; font-size:11px; font-weight:900;
}
.division-segment.active {
  border-color:#0F473C; background:#0F473C; color:#fff; box-shadow:0 6px 14px rgba(15,71,60,.16);
}
.record-division-native {
  position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important;
  overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; border:0!important;
}
.record-score-input {
  min-height:54px!important; font-size:19px!important; font-weight:900!important;
  text-align:center; color:#102d26!important;
}
.record-form { padding:17px 0 0; }
.record-form-head h3 { font-size:20px; }
.public-toggle small { color:#88918d; font-size:9px; font-weight:700; }
#leaderboardSection[hidden] { display:none!important; }
@media (max-width:390px) { .division-segments { grid-template-columns:repeat(2,minmax(0,1fr)); } }


/* ===== v8 마이페이지 + 리더보드 ===== */
.member-avatar-image,.my-page-avatar-image { width:100%; height:100%; object-fit:cover; border-radius:50%; display:block; }
.my-page-section { padding-top:18px; }
.my-page-card { max-width:620px; margin:0 auto; padding:18px; border:1px solid rgba(15,71,60,.14); border-radius:18px; background:#fff; box-shadow:var(--shadow-card,0 12px 30px rgba(10,53,45,.10)); }
.my-page-hero { display:flex; gap:14px; align-items:center; margin-top:16px; padding:16px; border-radius:15px; background:linear-gradient(135deg,#0F473C,#176154); color:#fff; }
.my-page-avatar { width:66px; height:66px; flex:0 0 auto; display:grid; place-items:center; overflow:hidden; border:2px solid rgba(255,255,255,.7); border-radius:50%; background:#fff; color:#0F473C; font-size:22px; font-weight:950; }
.my-page-hero-copy { min-width:0; }
.my-page-hero-copy strong { display:block; font-size:21px; letter-spacing:-.035em; }
.my-page-hero-copy span { display:block; margin-top:3px; color:rgba(255,255,255,.72); font-size:11px; }
.my-page-edit { margin-top:16px; padding:15px; border:1px solid #dfe7e3; border-radius:14px; background:#fbfcfb; }
.my-page-save { width:100%; }
.my-page-minimal-note { margin:10px 0 0; color:#78837e; font-size:10px; line-height:1.6; }
.my-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-top:16px; }
.my-stat { min-width:0; padding:13px 9px; border:1px solid #dce5e1; border-radius:13px; background:#f4f8f6; text-align:center; }
.my-stat span { display:block; color:#74807a; font-size:9px; font-weight:850; }
.my-stat strong { display:block; margin-top:5px; color:#0F473C; font-size:18px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.my-recent-section { margin-top:18px; padding-top:17px; border-top:1px solid #e4e9e6; }
.my-page-section-head h3 { margin:0; font-size:18px; letter-spacing:-.03em; }
.my-recent-records { margin-top:10px; }
.my-recent-row { display:grid; grid-template-columns:56px 1fr; gap:10px; align-items:center; padding:11px 0; border-top:1px solid #edf0ee; }
.my-recent-row:first-child { border-top:0; }
.my-recent-date strong,.my-recent-date span,.my-recent-info strong,.my-recent-info span { display:block; }
.my-recent-date strong { color:#0F473C; font-size:13px; }
.my-recent-date span { margin-top:2px; color:#8a938f; font-size:9px; }
.my-recent-info strong { font-size:14px; }
.my-recent-info span { margin-top:3px; color:#7a847f; font-size:10px; font-weight:850; }
.my-recent-empty { padding:22px 10px; color:#7b837f; text-align:center; font-size:12px; }
.my-page-footer { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:18px; padding-top:15px; border-top:1px solid #e6ebe8; }
.my-page-footer a { color:#0F473C; font-size:11px; font-weight:850; }
.my-page-footer button { min-height:40px; padding:0 14px; }

.leaderboard-subhead { margin-top:12px; }
.leaderboard-filters { display:flex; gap:6px; overflow-x:auto; padding-bottom:5px; scrollbar-width:none; }
.leaderboard-filters::-webkit-scrollbar { display:none; }
.leader-filter { flex:0 0 auto; min-height:34px; padding:0 11px; border:1px solid #d6dfdb; border-radius:999px; background:#fff; color:#6d7872; font-size:10px; font-weight:900; }
.leader-filter.active { border-color:#0F473C; background:#0F473C; color:#fff; }
.leaderboard-count { display:block; margin-top:7px; color:#7b8580; font-size:10px; font-weight:800; }
.my-rank-card { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:10px; padding:11px 13px; border-radius:11px; background:#e7f1ed; color:#285047; }
.my-rank-card span { font-size:10px; font-weight:850; }
.my-rank-card strong { color:#0F473C; font-size:13px; }
.leaderboard-row.podium-1 { background:linear-gradient(90deg,#fff9df 0%,#fff 65%); }
.leaderboard-row.podium-2 { background:linear-gradient(90deg,#f4f5f6 0%,#fff 65%); }
.leaderboard-row.podium-3 { background:linear-gradient(90deg,#fff2e7 0%,#fff 65%); }
.leaderboard-row.podium-1,.leaderboard-row.podium-2,.leaderboard-row.podium-3 { margin:0 -7px; padding-left:7px; padding-right:7px; border-radius:10px; }

@media(max-width:520px){ .my-stats{grid-template-columns:repeat(2,minmax(0,1fr));} }


/* ===== v8.1 관리자 모바일 미리보기 ===== */
.live-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}


/* ===== v9 홈 아이콘 + RX 등급 ===== */
.division-segments {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.division-segment {
  min-width: 0;
  padding-left: 4px;
  padding-right: 4px;
}
.division-segment.division-rx-plus {
  border-color: #c59a2d;
  color: #8a6510;
}
.division-segment.division-rx-plus.active {
  border-color: #b88a18;
  background: linear-gradient(180deg, #c9a43d 0%, #a77a11 100%);
  color: #fff;
  box-shadow: 0 6px 14px rgba(168,116,43,.22);
}
.division-badge {
  white-space: nowrap;
}
@media (max-width: 360px) {
  .division-segments {
    grid-template-columns: repeat(5, minmax(48px,1fr));
    overflow-x: auto;
    padding-bottom: 2px;
  }
}


/* ===== v9.1 마이페이지 / 오늘 순위 강조 ===== */
.leaderboard-section.leaderboard-prominent {
  margin: 16px 0 4px;
  padding: 16px 14px;
  border: 1px solid #cfe0d9;
  border-radius: 15px;
  background: linear-gradient(180deg, #f5faf7 0%, #ffffff 100%);
  box-shadow: 0 8px 20px rgba(15,71,60,.06);
}
.leaderboard-prominent .leaderboard-head { align-items: center; }
.leaderboard-prominent .leaderboard-head h3 { font-size: 20px; }
.leaderboard-prominent .leaderboard-count { font-size: 11px; }

.leaderboard-row {
  grid-template-columns: 34px 42px minmax(0,1fr) auto;
  gap: 9px;
}
.leader-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #dbe5e0;
  border-radius: 50%;
  background: #e8f1ed;
  color: #0F473C;
  font-size: 13px;
  font-weight: 950;
}
.leader-avatar-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 50%;
}
.leaderboard-row.podium-1 .leader-avatar { border: 2px solid #d3a82f; }
.leaderboard-row.podium-2 .leader-avatar { border: 2px solid #aeb5b8; }
.leaderboard-row.podium-3 .leader-avatar { border: 2px solid #c98a55; }

@media (max-width: 430px) {
  .leaderboard-section.leaderboard-prominent {
    padding-left: 12px;
    padding-right: 12px;
  }
  .leaderboard-row {
    grid-template-columns: 28px 38px minmax(0,1fr) auto;
    gap: 7px;
  }
  .leader-avatar { width: 36px; height: 36px; }
  .leader-result { font-size: 13px; }
}


/* ===== v9.2 WOD 액션 / 기록 동선 / 영문 요일 ===== */
.wod-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  margin-bottom: 5px;
}
.wod-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 39px;
  padding: 0 12px;
  border: 1px solid #cfdad5;
  border-radius: 10px;
  background: #fff;
  color: #5575c2;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 3px 8px rgba(17,24,39,.05);
}
.wod-action-btn:active { transform: translateY(1px); }
.wod-action-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1.5px solid #6387ca;
  border-radius: 50%;
  color: #5278c8;
  font-size: 14px;
  line-height: 1;
}
.wod-action-icon.list-icon {
  border: 0;
  border-radius: 0;
  font-size: 20px;
  font-weight: 900;
}

.edit-record-btn {
  width: 100%;
  min-height: 43px;
  margin-top: 13px;
  border-color: #b9d0c7;
  color: #0F473C;
  font-weight: 950;
}

.date-day, .week-day { letter-spacing: .04em; }
.date-btn.is-today:not(.active) .date-num {
  border-color: #7ca99a;
  background: #f0f7f4;
  color: #0F473C;
}
.date-btn.is-today:not(.active) .date-day {
  color: #0F473C;
  font-weight: 950;
}

.record-form.hidden { display: none !important; }

@media (max-width: 390px) {
  .wod-action-btn {
    min-height: 37px;
    padding: 0 10px;
    font-size: 11px;
  }
}


/* ===== v9.3 리더보드 가독성 개선 ===== */
.leaderboard-list {
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid #e3e9e6;
  border-radius: 13px;
  background: #fff;
}

.leaderboard-row,
.leaderboard-row.mine {
  position: relative;
  display: grid;
  grid-template-columns: 42px 52px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  min-height: 76px;
  margin: 0;
  padding: 11px 12px;
  border-top: 1px solid #edf0ee;
  border-radius: 0;
  background: #fff;
}

.leaderboard-row:first-child {
  border-top: 0;
}

.leaderboard-row.mine {
  background: #f2f8f5;
}

.leaderboard-row.podium-1 {
  background: linear-gradient(90deg, #fff9e8 0%, #ffffff 60%);
  box-shadow: inset 4px 0 0 #d2a52a;
}
.leaderboard-row.podium-2 {
  background: linear-gradient(90deg, #f5f6f7 0%, #ffffff 60%);
  box-shadow: inset 4px 0 0 #aeb5b8;
}
.leaderboard-row.podium-3 {
  background: linear-gradient(90deg, #fff4eb 0%, #ffffff 60%);
  box-shadow: inset 4px 0 0 #c98a55;
}
.leaderboard-row.mine.podium-1,
.leaderboard-row.mine.podium-2,
.leaderboard-row.mine.podium-3 {
  background-blend-mode: multiply;
}

.leader-rank {
  display: grid;
  place-items: center;
  min-width: 38px;
  min-height: 46px;
}

.leader-medal {
  position: relative;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-top: -4px;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-weight: 950;
  line-height: 1;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.08));
}
.leader-medal::before,
.leader-medal::after {
  content: "";
  position: absolute;
  bottom: -11px;
  width: 9px;
  height: 14px;
  background: currentColor;
  clip-path: polygon(0 0,100% 0,82% 100%,50% 72%,18% 100%);
  z-index: -1;
}
.leader-medal::before { left: 4px; transform: rotate(7deg); }
.leader-medal::after { right: 4px; transform: rotate(-7deg); }

.leader-medal-number {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  color: inherit;
  font-size: 12px;
}

.medal-1 { color: #d0a021; background: #fff4c8; }
.medal-2 { color: #9da5a9; background: #eef0f1; }
.medal-3 { color: #bd7a43; background: #f9e6d8; }

.leader-rank-number {
  color: #66716c;
  font-size: 13px;
  font-weight: 950;
}

.leader-avatar {
  width: 48px;
  height: 48px;
  border-width: 1px;
}
.leaderboard-row.podium-1 .leader-avatar { border: 2px solid #d3a82f; }
.leaderboard-row.podium-2 .leader-avatar { border: 2px solid #aeb5b8; }
.leaderboard-row.podium-3 .leader-avatar { border: 2px solid #c98a55; }

.leader-info {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
}

.leader-name-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: wrap;
}

.leader-name {
  max-width: 100%;
  color: #18211d;
  font-size: 14px !important;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.division-badge {
  min-height: 19px;
  padding: 0 6px;
  background: #f0eee8;
  color: #60594c;
  font-size: 8.5px;
}

.mine-badge {
  min-height: 19px;
  padding: 0 6px;
  font-size: 8.5px;
}

.leader-result-line {
  display: flex;
  align-items: center;
  margin-top: 4px;
}

.leader-result {
  color: #285bb8;
  font-size: 14px;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}

.leader-note {
  max-width: 100%;
  margin-top: 3px;
  color: #888f8b;
  font-size: 9.5px;
}

@media (max-width: 430px) {
  .leaderboard-row,
  .leaderboard-row.mine {
    grid-template-columns: 38px 46px minmax(0,1fr);
    gap: 8px;
    min-height: 70px;
    padding: 10px 9px;
  }
  .leader-medal {
    width: 30px;
    height: 30px;
  }
  .leader-avatar {
    width: 44px;
    height: 44px;
  }
  .leader-name {
    font-size: 13px !important;
  }
  .leader-result {
    font-size: 13px;
  }
}


/* ===== v9.4 날짜 원 자유 스크롤 ===== */
.date-strip {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: none !important;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  overscroll-behavior-x: contain;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.date-strip::-webkit-scrollbar {
  display: none;
}
.date-strip.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}
.date-btn {
  scroll-snap-align: none !important;
  flex: 0 0 auto;
}


/* ===== v9.4.1 주간 카드 날짜 배경 높이 수정 =====
   2열 Grid에서 같은 행의 카드 높이는 더 긴 카드에 맞춰 늘어나는데,
   내부 .week-card-inner는 min-height만 가지고 있어 짧은 카드의 날짜 배경이
   아래까지 늘어나지 않던 현상을 수정합니다. */
.week-card {
  display: flex;
}
.week-card-inner {
  width: 100%;
  height: 100%;
  flex: 1 1 auto;
  align-self: stretch;
}
.week-date-cell {
  align-self: stretch;
}
