/* 📈 코인 타임머신 (2026-10-10) — act/cointm.php 전용 */
#ct-wrap {
    --ct-bg: #ffffff; --ct-card: #f5f7fa; --ct-line: #e3e8ef; --ct-text: #18212d; --ct-sub: #5b6878;
    --ct-red: #e8384a; --ct-blue: #2f74e8; --ct-now: #f5a700; --ct-avg: #8b5cf6;
    --ct-chart: #0f1722; --ct-grid: rgba(255,255,255,.07); --ct-axis: #8494a8; --ct-future: rgba(255,255,255,.035);
    --ct-accent: #16c784; --ct-accent2: #0ea5e9;
    width: 100%; max-width: none; margin: 0 auto 6px; box-sizing: border-box; color: var(--ct-text);
}
html[data-theme="dark"] #ct-wrap {
    --ct-bg: #151b24; --ct-card: #1b2330; --ct-line: #2a3443; --ct-text: #e8edf4; --ct-sub: #9aa8b9;
    --ct-red: #ff5a67; --ct-blue: #4c8dff; --ct-chart: #0b111a;
}
#ct-wrap *, #ct-wrap *::before, #ct-wrap *::after { box-sizing: border-box; }
#ct-wrap .ct-up { color: var(--ct-red); }
#ct-wrap .ct-dn { color: var(--ct-blue); }
#ct-wrap .ct-muted { color: var(--ct-sub); font-size: 13px; margin: 6px 0; }

/* 모드 */
.ct-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 10px; }
.ct-mode {
    display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-height: 64px; min-width: 0;
    padding: 10px 11px; border-radius: 14px; border: 1.5px solid var(--ct-line); background: var(--ct-card);
    color: var(--ct-text); text-align: left; cursor: pointer; font-family: inherit; transition: border-color .15s, box-shadow .15s;
}
.ct-mode.on { border-color: var(--ct-accent); box-shadow: 0 0 0 3px rgba(22,199,132,.16); }
.ct-mode-t { font-size: 14px; font-weight: 900; letter-spacing: -.02em; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.ct-mode-t em { font-style: normal; font-size: 10px; font-weight: 800; color: #fff; background: var(--ct-accent); border-radius: 8px; padding: 1px 6px; }
.ct-mode-s { font-size: 11.5px; color: var(--ct-sub); font-weight: 700; line-height: 1.35; word-break: keep-all; }
.ct-mode-s b { color: var(--ct-text); }
.ct-mode-y { font-size: 11px; color: var(--ct-sub); line-height: 1.35; word-break: keep-all; }
.ct-mode-y b { color: var(--ct-text); }

/* HUD */
#ct-hud { display: grid; grid-template-columns: 1.6fr 1fr 1fr .8fr; gap: 6px; margin: 0 0 8px; }
#ct-hud > div { min-width: 0; text-align: center; padding: 7px 3px; border-radius: 11px; background: var(--ct-card); border: 1px solid var(--ct-line); }
#ct-hud small { display: block; font-size: 10px; letter-spacing: .04em; color: var(--ct-sub); font-weight: 700; }
#ct-hud strong { display: block; margin-top: 2px; font-size: 15px; font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 400px) {
    #ct-hud { grid-template-columns: 1fr 1fr 1fr; }
    #ct-hud .w2 { grid-column: 1 / -1; }
    #ct-hud .w2 strong { font-size: 18px; }
    #ct-hud strong { font-size: 13.5px; }
}

/* 차트 */
#ct-stage { position: relative; border-radius: 16px; overflow: hidden; background: var(--ct-chart); box-shadow: 0 12px 30px rgba(10,20,35,.22); border: 1px solid rgba(255,255,255,.06); }
#ct-canvas { display: block; width: 100%; height: 260px; touch-action: manipulation; }
.ct-topline { display: flex; justify-content: space-between; align-items: center; padding: 8px 11px 0; font-size: 11px; font-weight: 800; letter-spacing: .05em; color: #8fa2b8; }
#ct-dday { font-size: 13px; color: #fbbf24; font-variant-numeric: tabular-nums; }
#ct-count { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 72px; font-weight: 900; color: #fff; text-shadow: 0 6px 24px rgba(0,0,0,.5); pointer-events: none; background: rgba(8,14,22,.25); }
#ct-count[hidden] { display: none; }
#ct-flash { position: absolute; left: 50%; top: 34px; transform: translate(-50%, -6px); opacity: 0; padding: 6px 14px; border-radius: 18px; font-size: 13px; font-weight: 900; color: #fff; pointer-events: none; transition: opacity .2s, transform .2s; white-space: nowrap; }
#ct-flash.on { opacity: 1; transform: translate(-50%, 0); }
#ct-flash.b { background: var(--ct-red); }
#ct-flash.s { background: var(--ct-blue); }

.ct-panel { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px 18px;
    background: linear-gradient(160deg, rgba(9,17,27,.94), rgba(12,30,40,.96)); }
.ct-panel[hidden] { display: none; }
.ct-overline { font-size: 10.5px; font-weight: 800; letter-spacing: .14em; color: var(--ct-accent); }
.ct-panel .t { margin-top: 6px; font-size: 25px; font-weight: 900; color: #fff; letter-spacing: -.03em; line-height: 1.25; }
.ct-panel .d { margin: 10px 0 14px; font-size: 13px; line-height: 1.7; color: #c3cfdc; word-break: keep-all; }
.ct-panel .d b { color: #86efc4; }
/* 결과 뒤: 차트를 가리지 않게 아래 띠로 */
.ct-panel.after { position: static; background: rgba(9,17,27,.9); padding: 10px 12px 12px; flex-direction: row; flex-wrap: wrap; gap: 6px 10px; }
.ct-panel.after .ct-overline, .ct-panel.after .t { display: none; }
.ct-panel.after .d { margin: 0; font-size: 12px; flex: 1 1 180px; text-align: left; }

.ct-btn { min-height: 46px; min-width: 180px; padding: 11px 22px; border: 0; border-radius: 24px; cursor: pointer; font-family: inherit;
    background: linear-gradient(135deg, var(--ct-accent), var(--ct-accent2)); color: #04221a; font-size: 15px; font-weight: 900; box-shadow: 0 8px 20px rgba(14,165,233,.28); }
.ct-btn:disabled { opacity: .5; cursor: default; }
.ct-btn.ghost { background: var(--ct-card); color: var(--ct-text); border: 1.5px solid var(--ct-line); box-shadow: none; }
.ct-panel.after .ct-btn { min-width: 0; min-height: 44px; font-size: 14px; padding: 9px 16px; }

/* 조작 */
.ct-controls { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 10px 0 0; }
#ct-trade { min-height: 58px; border: 0; border-radius: 16px; cursor: pointer; font-family: inherit; font-size: 19px; font-weight: 900; color: #fff;
    background: linear-gradient(135deg, #f0435a, #d92d42); box-shadow: 0 8px 20px rgba(232,56,74,.3); touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: transform .06s; }
#ct-trade.sell { background: linear-gradient(135deg, #3f87ff, #2563eb); box-shadow: 0 8px 20px rgba(47,116,232,.3); }
#ct-trade:active:not(:disabled) { transform: translateY(2px) scale(.99); }
#ct-trade:disabled { opacity: .45; cursor: default; box-shadow: none; }
#ct-skip { min-height: 58px; min-width: 92px; padding: 0 14px; border-radius: 16px; cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 900;
    border: 1.5px solid var(--ct-line); background: var(--ct-card); color: var(--ct-text); }
#ct-skip:disabled { opacity: .45; cursor: default; }
.ct-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 2px 10px; margin: 6px 2px 0; font-size: 11px; color: var(--ct-sub); font-weight: 700; }

/* 결과 */
#ct-result { margin: 12px 0 0; padding: 16px 14px; border-radius: 16px; background: var(--ct-bg); border: 1.5px solid var(--ct-line); box-shadow: 0 8px 24px rgba(15,25,40,.08); }
#ct-result[hidden] { display: none; }
.ct-r-top { text-align: center; }
.ct-r-top small { font-size: 12px; font-weight: 800; color: var(--ct-sub); }
.ct-r-ret { font-size: 46px; font-weight: 900; line-height: 1.1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ct-r-final { font-size: 13px; color: var(--ct-sub); font-weight: 700; }
.ct-r-final b { color: var(--ct-text); }
.ct-r-reveal { margin: 12px 0 0; padding: 12px; border-radius: 12px; background: var(--ct-card); text-align: center; font-size: 13px; color: var(--ct-sub); line-height: 1.6; }
.ct-r-reveal > span { display: block; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.ct-r-reveal > b { font-size: 22px; color: var(--ct-text); font-weight: 900; }
.ct-r-reveal > em { font-style: normal; font-size: 12px; font-weight: 800; color: var(--ct-sub); margin-left: 2px; }
.ct-r-px { font-size: 12px; word-break: keep-all; }
.ct-r-bh { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--ct-line); font-size: 13.5px; text-align: center; line-height: 1.6; }
.ct-r-bh > span { display: block; font-size: 12px; color: var(--ct-sub); }
.ct-r-crowd, .ct-r-tl { margin: 12px 0 0; font-size: 13px; }
.ct-r-crowd h4, .ct-r-tl h4, #ct-board h4 { margin: 0 0 8px; font-size: 14px; font-weight: 900; color: var(--ct-text); }
.ct-r-crowd p { margin: 6px 0 0; color: var(--ct-sub); }
.ct-bar { display: grid; grid-template-columns: 78px 1fr 40px; align-items: center; gap: 8px; margin: 5px 0; font-size: 12px; font-weight: 700; color: var(--ct-sub); }
.ct-bar i { height: 10px; border-radius: 6px; background: var(--ct-card); overflow: hidden; border: 1px solid var(--ct-line); }
.ct-bar em { display: block; height: 100%; border-radius: 6px; }
.ct-bar em.p { background: var(--ct-red); } .ct-bar em.h { background: var(--ct-now); } .ct-bar em.c { background: var(--ct-blue); }
.ct-bar b { text-align: right; color: var(--ct-text); font-variant-numeric: tabular-nums; }
.ct-r-tl ul { list-style: none; margin: 0; padding: 0; max-height: 210px; overflow: auto; }
.ct-r-tl li { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; padding: 6px 2px; border-bottom: 1px solid var(--ct-line); font-size: 12px; color: var(--ct-sub); font-variant-numeric: tabular-nums; }
.ct-r-tl li b { font-weight: 900; }
.ct-r-note { margin: 12px 0 0; padding: 9px 11px; border-radius: 10px; background: var(--ct-card); font-size: 12.5px; color: var(--ct-sub); line-height: 1.55; }
.ct-r-note b { color: var(--ct-text); }
.ct-r-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 0; }
.ct-r-btns .ct-btn { min-width: 0; font-size: 13.5px; padding: 10px 8px; }
@media (max-width: 360px) { .ct-r-btns { grid-template-columns: 1fr; } .ct-r-ret { font-size: 40px; } .ct-bar { grid-template-columns: 70px 1fr 36px; } }

/* 전국 현황 */
#ct-board { margin: 12px 0 0; padding: 14px; border-radius: 16px; background: var(--ct-card); border: 1px solid var(--ct-line); }
#ct-board ol { margin: 10px 0 0; padding: 0 0 0 22px; font-size: 13px; }
#ct-board li { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; color: var(--ct-text); }
#ct-board li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#ct-board .ct-yday { margin: 10px 0 0; font-size: 12.5px; color: var(--ct-sub); line-height: 1.6; word-break: keep-all; }
#ct-board .ct-yday b { color: var(--ct-text); }

#ct-toast { position: fixed; left: 50%; bottom: 24px; z-index: 9999; transform: translate(-50%, 20px); opacity: 0; max-width: calc(100% - 32px);
    padding: 10px 16px; border-radius: 22px; background: rgba(15,23,34,.92); color: #fff; font-size: 13px; font-weight: 700; pointer-events: none; transition: opacity .2s, transform .2s; text-align: center; }
#ct-toast.on { opacity: 1; transform: translate(-50%, 0); }
.ct-legal { margin: 10px 2px 0; font-size: 11px; color: var(--ct-sub); text-align: center; line-height: 1.5; word-break: keep-all; }

/* 가이드 */
.ct-guide { text-align: left; line-height: 1.7; margin-top: 16px; }
.ct-guide p, .ct-guide li { font-size: .9rem; }
.ct-guide h3 { font-size: 1rem; margin: 10px 0 4px; }
.ct-guide ul { padding-left: 18px; margin: 4px 0; }
.ct-guide small { font-size: .8rem; display: block; margin-top: 8px; }

/* 10-10 게임 영역 폭 100%: 배경·테두리는 꽉 채우고 넓은 화면에서는 안쪽 콘텐츠만 가운데로 모은다 */
@media (min-width: 761px) {
    #ct-result { padding-left: max(14px, calc((100% - 680px) / 2)); padding-right: max(14px, calc((100% - 680px) / 2)); }
}
