:root {
    --bg: #f4f7fb;
    --panel: #ffffff;
    --ink: #1c2430;
    --muted: #5f6b7a;
    --line: #dbe3ef;
    --accent: #315cbe;
    --accent-2: #7b61d8;
    --shadow: 0 16px 40px rgba(27, 39, 69, .08);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 16px/1.5 Arial, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2 { margin: 0 0 16px; line-height: 1.15; }
h1 {
    font-size: clamp(26px, 4vw, 40px);
    margin-bottom: 24px;
    padding-left: 18px;
}
h2 { font-size: 22px; }
section > h2 { padding-left: 18px; }
.section-title-with-count {
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.section-count {
    display: inline-flex;
    align-items: center;
    min-width: 28px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--panel);
    color: var(--muted);
    padding: 2px 9px;
    font-size: .62em;
    line-height: 1.35;
    font-weight: 700;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-header-wrap {
    position: relative;
    z-index: 1000;
    width: min(100% - 96px, 1320px);
    margin: 0 auto;
    margin-top: 8px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}
.site-header {
    padding: 6px 16px;
    display: grid;
    grid-template-columns: auto minmax(280px, 1fr) auto auto;
    align-items: center;
    gap: 20px 15px;
    justify-content: stretch;
}
.site-footer {
    width: min(100% - 96px, 1320px);
    margin: 0 auto;
    padding: 18px 0;
    display: flex;
    justify-content: space-between;
    gap: 16px;
}
.brand { font-weight: 800; color: var(--ink); font-size: 20px; }
.top-nav { display: flex; gap: 14px; }
.header-search {
    width: 100%;
    padding-top: 0;
    align-self: center;
    justify-self: center;
}
.header-menu {
    position: relative;
    z-index: 1010;
    justify-self: end;
}
.header-time-format {
    justify-self: end;
}
.header-menu summary {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    list-style: none;
}
.header-menu summary::-webkit-details-marker {
    display: none;
}
.header-menu summary span,
.header-menu summary span::before,
.header-menu summary span::after {
    content: "";
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: var(--ink);
}
.header-menu summary span {
    position: relative;
}
.header-menu summary span::before,
.header-menu summary span::after {
    position: absolute;
    left: 0;
}
.header-menu summary span::before {
    top: -7px;
}
.header-menu summary span::after {
    top: 7px;
}
.header-menu-links {
    position: absolute;
    z-index: 1020;
    top: 0;
    right: calc(100% + 12px);
    width: max-content;
    max-width: calc(100vw - 96px);
    min-width: 520px;
    padding: 12px;
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}
.menu-group {
    display: grid;
    align-content: start;
    gap: 0;
}
.menu-group strong {
    padding: 5px 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
}
.header-menu-links a {
    padding: 9px 14px;
    border-radius: 0;
    color: var(--ink);
    font-weight: 400;
    line-height: 1.3;
    white-space: nowrap;
}
.header-menu-links a:hover {
    background: #f4f7fb;
    text-decoration: none;
}
.site-header:has(.header-menu[open]) .header-search {
    visibility: hidden;
}
.page {
    width: min(100% - 96px, 1320px);
    margin: 0 auto;
    padding: 28px 0 16px;
}
.site-footer { color: var(--muted); border-top: 1px solid var(--line); }
.footer-links,
.admin-links {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}
.content-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 24px;
    box-shadow: var(--shadow);
}
.full-link-list,
.more-link-list {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}
.more-link-list {
    margin-top: 12px;
}
.full-link-list summary,
.more-link-list summary {
    padding: 16px 18px;
    cursor: pointer;
    color: var(--ink);
    font-weight: 700;
}
.full-link-list .link-table,
.more-link-list .link-table {
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    box-shadow: none;
}
.progressive-link-list .is-hidden {
    display: none;
}
.progressive-link-list.has-more {
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}
.show-more-button {
    display: block;
    width: min(360px, calc(100% - 48px));
    margin: -1px auto 0;
    border: 1px solid var(--line);
    border-top: 0;
    border-radius: 0 0 8px 8px;
    background: var(--panel);
    color: var(--ink);
    padding: 12px 22px 13px;
    font: inherit;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 16px 30px rgba(27, 39, 69, .06);
}
.show-more-button:hover {
    border-color: rgba(49, 92, 190, .45);
    border-top: 0;
    color: var(--accent);
}
.difference-page {
    display: grid;
    gap: 24px;
    margin-top: 0;
}
.difference-page h1 {
    margin-bottom: 0;
    padding-left: 18px;
}
.difference-picker {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 18px;
}
.calendar-page {
    display: grid;
    gap: 24px;
    margin-top: 0;
}
.stopwatch-page {
    display: grid;
    gap: 0;
    margin-top: 0;
}
.stopwatch-head h1 {
    margin-bottom: 24px;
}
.stopwatch-panel {
    margin: 0 0 16px;
    border-radius: 8px;
    display: grid;
    justify-items: center;
    gap: 12px;
    padding: 24px;
    color: #fff;
    background: linear-gradient(120deg, #35418f, #826be3);
    box-shadow: var(--shadow);
}
.stopwatch-timebox {
    display: grid;
    grid-template-columns: minmax(2ch, auto) .42ch 2ch 1.05ch;
    grid-template-rows: auto auto;
    align-items: end;
    justify-content: center;
    column-gap: .02em;
    width: max-content;
    max-width: 100%;
    color: #fff;
    font-size: clamp(70px, 11.2vw, 124px);
    font-weight: 800;
    line-height: .9;
    letter-spacing: 0;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 2px 2px rgba(0,0,0,.25);
}
.stopwatch-value {
    display: block;
}
.stopwatch-minutes,
.stopwatch-seconds,
.stopwatch-separator {
    text-align: center;
}
.stopwatch-centiseconds {
    align-self: end;
    padding-bottom: .05em;
    font-size: .36em;
    font-weight: 500;
}
.stopwatch-unit {
    display: block;
    padding-top: 10px;
    color: rgba(255,255,255,.72);
    font-size: 15px;
    line-height: 1.1;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: .04em;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0,0,0,.22);
}
.stopwatch-unit-minutes {
    grid-column: 1;
    grid-row: 2;
}
.stopwatch-unit-seconds {
    grid-column: 3;
    grid-row: 2;
}
.stopwatch-controls {
    display: flex;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
}
.stopwatch-controls button {
    min-width: 150px;
    border-radius: 999px;
    padding: 13px 20px;
    font-size: 18px;
    box-shadow: 0 14px 30px rgba(27, 39, 69, .12);
}
.stopwatch-start {
    background: #43d383;
}
.stopwatch-lap {
    background: #f6c543;
}
.stopwatch-reset {
    background: #8da0c4;
}
.stopwatch-controls button:disabled {
    opacity: .58;
    cursor: not-allowed;
}
.stopwatch-laps {
    width: 100%;
    justify-self: stretch;
    margin: 0 0 28px;
    padding: 14px 24px 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
}
.stopwatch-laps table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
}
.stopwatch-laps th,
.stopwatch-laps td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    text-align: center;
    font-size: 20px;
}
.stopwatch-laps th {
    font-weight: 800;
}
.stopwatch-laps td:last-child {
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.stopwatch-seo-text {
    max-width: none;
}
.epoch-page {
    display: grid;
    gap: 0;
    margin-top: 0;
}
.epoch-panel {
    margin: 0 0 16px;
    border-radius: 8px;
    display: grid;
    gap: 18px;
    padding: 24px;
    background: linear-gradient(120deg, #35418f, #826be3);
    box-shadow: var(--shadow);
    color: #fff;
}
.epoch-now {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,.18);
}
.epoch-now span {
    color: rgba(255,255,255,.78);
    font-weight: 700;
}
.epoch-now strong {
    font-size: clamp(28px, 5vw, 52px);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 2px 2px rgba(0,0,0,.25);
}
.epoch-tabs {
    display: inline-flex;
    width: max-content;
    max-width: 100%;
    padding: 4px;
    gap: 4px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 8px;
    background: rgba(255,255,255,.08);
}
.epoch-tabs button,
.epoch-now button,
.epoch-result-grid button {
    border-radius: 7px;
}
.epoch-tabs button {
    background: transparent;
    color: rgba(255,255,255,.78);
}
.epoch-tabs button.is-active {
    background: #fff;
    color: var(--accent);
}
.epoch-mode-panel {
    display: none;
    grid-template-columns: minmax(260px, 1fr) minmax(180px, 260px);
    gap: 14px;
    align-items: end;
}
.epoch-mode-panel.is-active {
    display: grid;
}
.epoch-panel label {
    display: grid;
    gap: 7px;
    color: rgba(255,255,255,.82);
    font-weight: 800;
}
.epoch-panel input,
.epoch-panel select {
    width: 100%;
    height: 48px;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    padding: 0 12px;
    font: inherit;
}
.epoch-main-input input {
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: 22px;
    font-variant-numeric: tabular-nums;
}
.epoch-date-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(80px, 1fr));
    gap: 12px;
}
.epoch-results {
    width: 100%;
    justify-self: stretch;
    margin: 0 0 28px;
    padding: 18px 24px 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
}
.epoch-results h2 {
    margin-bottom: 14px;
    padding-left: 0;
}
.epoch-result-grid {
    display: grid;
    gap: 10px;
}
.epoch-result-grid > div {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    min-height: 48px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}
.epoch-result-grid span {
    color: var(--muted);
    font-weight: 700;
}
.epoch-result-grid code {
    overflow-wrap: anywhere;
    color: var(--ink);
    font-size: 18px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.epoch-result-grid button {
    padding: 8px 10px;
    background: #eef3fb;
    color: var(--accent);
    font-size: 14px;
}
.epoch-result-grid button.is-copied {
    background: #35b86b;
    color: #fff;
}
.epoch-seo-text {
    max-width: none;
}
.tool-page {
    display: grid;
    gap: 0;
    margin-top: 0;
}
.tool-panel {
    display: grid;
    gap: 18px;
    margin: 0 0 28px;
    padding: 24px;
}
.tool-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.tool-grid.compact-grid {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
}
.tool-panel label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-weight: 800;
}
.tool-panel input,
.tool-panel select,
.tool-panel textarea {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    padding: 0 12px;
    font: inherit;
}
.tool-panel textarea {
    min-height: 96px;
    padding: 10px 12px;
    resize: vertical;
    line-height: 1.45;
}
.tool-actions,
.tool-weekdays {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;
}
.tool-actions label,
.tool-weekdays label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--ink);
    font-weight: 700;
}
.tool-actions input,
.tool-weekdays input {
    width: auto;
    min-height: 0;
}
.tool-help {
    margin: 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.5;
}
.tool-result-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.tool-result-grid.wide-result {
    grid-template-columns: 1fr;
}
.tool-result-grid.is-four-result {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.tool-result-grid.is-five-result {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}
.tool-result-item {
    display: grid;
    gap: 7px;
    min-height: 82px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbff;
}
.tool-result-item span {
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
}
.tool-result-item strong,
.tool-result-item code {
    color: var(--ink);
    font-size: clamp(20px, 3vw, 30px);
    line-height: 1.1;
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
}
.tool-result-grid.is-compact-result .tool-result-item strong,
.tool-result-grid.is-compact-result .tool-result-item code {
    font-size: clamp(15px, 2.25vw, 22px);
}
.tool-table {
    width: 100%;
    border-collapse: collapse;
}
.tool-table th,
.tool-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}
.tool-table th {
    background: #f4f7fb;
    font-weight: 800;
}
.timer-display {
    display: grid;
    place-items: center;
    min-height: 170px;
    border-radius: 8px;
    background: linear-gradient(120deg, #35418f, #826be3);
    color: #fff;
    font-size: clamp(48px, 10vw, 96px);
    font-weight: 900;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 2px 2px rgba(0,0,0,.25);
}
.moon-visual {
    display: grid;
    place-items: center;
    min-height: 160px;
}
.moon-visual span {
    display: block;
    width: 120px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #fff, #d8deea 55%, #94a0b8);
    box-shadow: inset var(--moon-shadow, -40px 0 0 rgba(15, 23, 42, .72)), 0 18px 34px rgba(27, 39, 69, .18);
}
.city-age-page {
    display: grid;
    gap: 0;
    margin-top: 0;
}
.city-age-intro {
    margin: 0 0 16px;
    padding: 0 18px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.5;
    text-align: left;
}
.city-age-detail-card {
    margin: 0 0 16px;
    border-radius: 8px;
    padding: 24px;
    color: #fff;
    background: linear-gradient(120deg, #35418f, #826be3);
    box-shadow: var(--shadow);
}
.city-age-detail-card h2 {
    margin-bottom: 18px;
    color: #fff;
    font-size: clamp(28px, 4vw, 44px);
}
.city-age-detail-card p {
    margin: 18px 0 0;
    color: rgba(255,255,255,.88);
    font-size: 18px;
}
.city-age-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.city-age-detail-grid div {
    display: grid;
    gap: 8px;
    padding: 16px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 8px;
    background: rgba(255,255,255,.08);
}
.city-age-detail-grid span {
    color: rgba(255,255,255,.74);
    font-weight: 800;
}
.city-age-detail-grid strong {
    font-size: clamp(24px, 3vw, 42px);
    line-height: 1.05;
    text-shadow: 0 2px 2px rgba(0,0,0,.22);
}
.city-age-summary {
    max-width: none;
    margin-bottom: 16px;
}
.city-age-list {
    margin: 0 0 28px;
    padding: 14px 24px 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
}
.city-age-table {
    display: grid;
    gap: 0;
}
.city-age-table-head,
.city-age-table-row {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(160px, .85fr) minmax(140px, .7fr);
    align-items: center;
    gap: 18px;
    min-height: 44px;
    text-align: center;
}
.city-age-table-head {
    border-radius: 8px 8px 0 0;
    background: #f4f7fb;
    color: var(--ink);
    font-size: 20px;
    font-weight: 800;
}
.city-age-table-row {
    border-bottom: 1px solid var(--line);
    font-size: 18px;
}
.city-age-table-row a {
    color: var(--accent);
    text-decoration: none;
}
.city-age-table-row a:hover {
    color: var(--accent-strong);
    text-decoration: underline;
}
.city-age-name {
    font-weight: 400;
}
.city-age-seo-text {
    max-width: none;
}
.days-until-page {
    display: grid;
    gap: 0;
    margin-top: 0;
}
.days-until-groups {
    display: grid;
    gap: 18px;
}
.days-until-link-grid,
.days-until-day-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px 18px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
}
.days-until-weekday-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
}
.days-until-weekday-grid a {
    display: grid;
    place-items: center;
    min-height: 72px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
    color: var(--ink);
    font-size: 22px;
    text-align: center;
    text-decoration: none;
}
.days-until-weekday-grid a:hover {
    color: var(--accent);
    text-decoration: none;
}
.days-until-link-grid a,
.days-until-day-grid a {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    color: var(--accent);
    text-decoration: none;
}
.days-until-link-grid a::before,
.days-until-day-grid a::before {
    content: "○";
    color: var(--muted);
    font-size: 14px;
}
.days-until-link-grid a:hover,
.days-until-day-grid a:hover {
    color: var(--accent-strong);
    text-decoration: underline;
}
.days-until-month h2 {
    text-align: center;
}
.days-until-months-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.days-until-detail-list.has-variants {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.days-until-detail {
    display: grid;
    gap: 22px;
    margin-bottom: 18px;
    padding: 28px;
    color: #fff;
    background: linear-gradient(120deg, #35418f, #826be3);
}
.days-until-detail h2 {
    margin: 0;
    color: #fff;
}
.days-until-detail-head,
.days-until-total-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.days-until-detail-head {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.days-until-detail-head div,
.days-until-total-grid div {
    display: grid;
    gap: 7px;
    padding: 16px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 8px;
    background: rgba(255,255,255,.08);
}
.days-until-detail span {
    color: rgba(255,255,255,.76);
    font-weight: 800;
}
.days-until-detail strong {
    color: #fff;
}
.days-until-main-counter {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    text-align: center;
}
.days-until-main-counter strong:first-child {
    font-size: clamp(72px, 11vw, 150px);
    line-height: .9;
    text-shadow: 0 3px 2px rgba(0,0,0,.24);
}
.days-until-main-counter span {
    font-size: clamp(24px, 4vw, 42px);
}
.days-until-main-counter strong:last-child {
    font-family: Consolas, "Courier New", monospace;
    font-size: clamp(34px, 5vw, 68px);
    line-height: 1;
    text-shadow: 0 3px 2px rgba(0,0,0,.24);
}
.days-until-total-grid strong {
    font-family: inherit;
    font-size: clamp(20px, 2.1vw, 31px);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
    line-height: 1.05;
    white-space: nowrap;
    word-break: normal;
}
.time-calculator-page {
    display: grid;
    gap: 0;
}
.time-calc-panel {
    display: grid;
    gap: 18px;
}
.time-calc-inputs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
    gap: 18px;
}
.time-calc-group {
    display: grid;
    justify-items: center;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    background: #f8fbff;
}
.time-calc-group h2 {
    margin: 0;
    color: var(--ink);
    font-size: 24px;
    font-weight: 800;
}
.time-calc-select-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    color: var(--muted);
}
.time-calc-date-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
}
.time-calc-date-row label {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}
.time-calc-select-row label {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}
.time-calc-select-row select,
.time-calc-date-row select,
.time-calc-mode select {
    width: auto;
    min-width: 68px;
    padding: 8px 9px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    font-size: 18px;
}
.time-calc-select-row select {
    width: 100%;
    min-width: 0;
}
.time-calc-date-row select {
    width: 100%;
    min-width: 0;
    font-size: 16px;
}
.time-calc-mode {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--muted);
    font-size: 18px;
    grid-column: 1 / -1;
}
.time-calc-mode select {
    font-size: 18px;
}
.time-calc-result {
    display: grid;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 24px;
    color: var(--muted);
    text-align: center;
    background: #fff;
}
.time-calc-result h2 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 800;
}
.time-calc-main-result,
.time-calc-compact strong {
    color: var(--muted);
    font-size: clamp(28px, 4vw, 48px);
    line-height: 1.15;
}
.time-calc-main-result strong,
.time-calc-compact strong strong {
    color: #2f9138;
}
.time-calc-main-result > strong {
    color: #2f9138;
}
.time-calc-words,
.time-calc-compact span,
.time-calc-between,
.time-calc-between-words {
    border-top: 1px solid var(--line);
    padding-top: 10px;
    font-size: 20px;
}
.time-calc-compact {
    display: grid;
    gap: 10px;
}
.time-calc-between {
    font-size: 22px;
}
.time-calc-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}
.time-calc-actions button {
    background: #eef3fb;
    color: var(--accent);
}
.time-calc-variants {
    display: flex;
    justify-content: center;
    gap: 34px;
    flex-wrap: wrap;
    border-top: 1px solid var(--line);
    padding-top: 12px;
    color: var(--muted);
    font-size: clamp(18px, 2vw, 26px);
    line-height: 1.15;
    font-weight: 700;
}
.time-calc-variants strong {
    color: #2f9138;
}
.calendar-print-bar,
.calendar-print-source {
    display: none;
}
.calendar-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}
.calendar-head h1 {
    margin-bottom: 0;
    padding-left: 18px;
}
.calendar-actions {
    display: flex;
    align-items: end;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}
.calendar-actions label {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.calendar-actions select {
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0 10px;
    background: #fff;
    font: inherit;
}
.calendar-actions .button-link,
.calendar-actions button {
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    font-size: 14px;
    line-height: 1;
}
.year-calendar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.month-card {
    margin: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
}
.calendar-year-links {
    margin: 0;
}
.calendar-year-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
}
.calendar-year-grid a {
    min-width: 62px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 7px 10px;
    background: #fff;
    color: var(--accent);
    text-align: center;
    font-weight: 700;
}
.calendar-year-grid a.is-current {
    border-color: rgba(49, 92, 190, .35);
    background: rgba(49, 92, 190, .08);
    color: var(--ink);
}
.month-card h2 {
    margin-bottom: 12px;
    padding-left: 0;
}
.month-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
}
.weekday,
.month-day,
.empty-day {
    min-height: 34px;
    display: grid;
    place-items: center;
    border-radius: 5px;
    font-weight: 700;
}
.weekday {
    min-height: 24px;
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
}
.month-day {
    border: 1px solid #edf1f6;
    background: #fbfdff;
}
.month-grid span:nth-child(7n),
.month-grid span:nth-child(7n + 6) {
    color: #c52d3a;
}
.diff-search {
    position: relative;
}
.diff-search .search-results {
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    max-height: 320px;
    overflow-y: auto;
    z-index: 60;
}
.diff-search .search-result {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border: 0;
    border-bottom: 1px solid #edf1f6;
    border-radius: 0;
    background: #fff;
    color: var(--ink);
    text-align: left;
    font: inherit;
    cursor: pointer;
}
.diff-search .search-result:hover,
.diff-search .search-result:focus {
    background: #f4f7fb;
    outline: none;
}
.diff-search .search-result span {
    color: var(--accent);
    font-weight: 700;
}
.diff-search .search-result small {
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
}
.difference-picker input[type="search"] {
    height: 50px;
    border-radius: 10px;
    font-size: 18px;
}
.diff-swap {
    width: 50px;
    height: 50px;
    padding: 0;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
}
.diff-submit {
    height: 50px;
    border-radius: 10px;
}
.difference-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px minmax(0, 1fr);
    align-items: center;
    gap: 24px;
    padding: 30px;
    background: linear-gradient(135deg, #3d499f, #8567e8);
    color: #fff;
}
.diff-city {
    min-width: 0;
    text-align: center;
}
.diff-city h2 {
    margin-bottom: 6px;
    font-size: 28px;
}
.diff-date {
    margin-bottom: 10px;
    color: rgba(255,255,255,.9);
    font-size: 17px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.diff-time {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 1em;
    font-size: clamp(70px, 11.2vw, 124px);
    line-height: 1;
    font-weight: 300;
    letter-spacing: 0;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    white-space: nowrap;
    text-shadow: 0 2px 2px rgba(0,0,0,.25);
}
.difference-table-scroll {
    max-width: 100%;
    min-width: 0;
}
.diff-city p {
    margin: 14px 0 0;
    color: rgba(255,255,255,.9);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    flex-wrap: wrap;
}
.diff-city p img {
    width: 24px;
    height: 18px;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,.45);
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.diff-badge {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 0;
    background: rgba(255,255,255,.16);
    border: 8px solid rgba(255,255,255,.25);
    text-align: center;
}
.diff-badge strong {
    font-size: 42px;
    line-height: 1;
}
.diff-badge span {
    font-size: 18px;
    font-weight: 700;
}
.diff-badge em {
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    color: rgba(255,255,255,.9);
}
.difference-text {
    padding: 18px 24px;
}
.difference-text p {
    margin: 0;
    font-size: 18px;
}
.difference-table-card h2 {
    padding-left: 0;
    margin-bottom: 12px;
}
.difference-table-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
    gap: 30px;
}
.difference-table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 8px;
    table-layout: fixed;
}
.difference-table th {
    text-align: left;
    padding: 9px 12px;
    background: #eef4ff;
    font-size: 15px;
}
.difference-table th:nth-child(2),
.difference-table td:nth-child(2) {
    width: 86px;
    text-align: center;
    color: var(--accent);
    font-weight: 800;
}
.difference-table td {
    padding: 6px 12px;
    border-top: 1px solid var(--line);
    font-size: 16px;
    line-height: 1.25;
}
.difference-table tbody tr:nth-child(even) {
    background: #f7faff;
}
.difference-table tbody tr {
    cursor: pointer;
}
.difference-table tbody tr:hover {
    background: #eaf4ff;
}
.difference-table tbody tr.is-selected-time {
    background: #2fa7e8;
    color: #fff;
}
.difference-table tbody tr.is-selected-time:hover {
    background: #2fa7e8;
}
.difference-table tbody tr.is-selected-time td {
    border-top-color: #2fa7e8;
}
.difference-table tbody tr.is-selected-time span,
.difference-table tbody tr.is-selected-time td:nth-child(2) {
    color: #fff;
}
.difference-table tbody tr.is-now:not(.is-selected-time) {
    background: #fff7d6;
    box-shadow: inset 4px 0 0 #f4b400;
}
.difference-table tbody tr.is-now:not(.is-selected-time) td {
    border-top-color: #f5d56b;
}
.difference-table tbody tr.is-now td:first-child::after {
    content: "сейчас";
    display: inline-block;
    margin-left: 10px;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(244, 180, 0, .18);
    color: #8a5c00;
    font-size: 12px;
    font-weight: 800;
    vertical-align: 2px;
}
.difference-table tbody tr.is-selected-time.is-now td:first-child::after {
    background: rgba(255,255,255,.22);
    color: #fff;
}
.difference-table span {
    color: var(--muted);
    font-size: 13px;
}
.difference-dial {
    position: sticky;
    top: 18px;
    display: grid;
    place-items: center;
    min-height: 360px;
}
.dial-face {
    position: relative;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: #31a7e8;
    border: 18px solid #fff;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.25), var(--shadow);
}
.dial-face::before {
    content: "";
    position: absolute;
    inset: 98px;
    border-radius: 50%;
    background: rgba(255,255,255,.16);
}
.dial-tick {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 2px;
    height: 12px;
    background: rgba(255,255,255,.78);
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-132px);
    transform-origin: center;
}
.dial-tick.is-major {
    width: 3px;
    height: 22px;
}
.dial-center {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 84px;
    height: 84px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #1f98da;
    border: 10px solid rgba(255,255,255,.16);
    color: #fff;
    font-size: 34px;
    font-weight: 800;
}
.dial-marker {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 28px;
    height: 28px;
    margin: -14px 0 0 -14px;
    transform: rotate(var(--angle, 0deg)) translateY(-124px);
    transform-origin: center;
    z-index: 2;
}
.dial-marker i {
    display: block;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    border: 7px solid #31a7e8;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.dial-marker-right i {
    border-color: #fff;
    background: #31a7e8;
}
.dial-label {
    position: absolute;
    z-index: 3;
    padding: 6px 9px;
    border-radius: 5px;
    background: rgba(0,0,0,.82);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    left: var(--label-left, 50%);
    top: var(--label-top, 50%);
    transform: translate(var(--label-shift-x, -50%), var(--label-shift-y, -50%));
}
.static-content {
    max-width: 920px;
}
.static-page .static-content {
    max-width: none;
}
.static-content.city-age-summary,
.static-content.city-age-seo-text {
    max-width: none;
}
.home-seo-text {
    max-width: none;
}
.template-help {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
}
.template-help h2 {
    margin-bottom: 12px;
}
.variable-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 18px;
}
.variable-grid div {
    display: grid;
    gap: 3px;
}
.variable-grid code {
    font-weight: 700;
    color: var(--accent);
}

.breadcrumbs { color: var(--muted); margin: 4px 0 18px; padding-left: 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.page-head {
    display: block;
}
.page-head h1 {
    margin-bottom: 24px;
}
.live-search {
    position: relative;
    padding-top: 0;
}
.live-search input {
    width: 100%;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    padding: 0 14px;
    font: inherit;
    box-shadow: 0 10px 26px rgba(27, 39, 69, .06);
}
.live-search input:focus {
    outline: 2px solid rgba(49, 92, 190, .16);
    border-color: rgba(49, 92, 190, .45);
}
.search-results {
    position: absolute;
    z-index: 20;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.search-result {
    display: grid;
    gap: 2px;
    padding: 10px 12px;
    border-bottom: 1px solid #edf1f6;
}
.search-result:last-child {
    border-bottom: 0;
}
.search-result span {
    color: var(--accent);
}
.search-result small,
.search-empty {
    color: var(--muted);
}
.search-empty {
    padding: 12px;
}

.clock-panel {
    --clock-map-width: 328px;
    --clock-map-height: 205px;
    margin: 0 0 28px;
    border-radius: 8px;
    padding: 24px;
    display: grid;
    grid-template-columns: 251px minmax(0, 1fr) minmax(269px, var(--clock-map-width));
    gap: 6px;
    align-items: center;
    color: #fff;
    background: linear-gradient(120deg, #35418f, #826be3);
    box-shadow: var(--shadow);
}
.clock-face {
    width: 251px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: #fbfbfb;
    border: 12px solid rgba(0, 0, 0, .18);
    position: relative;
    color: #111;
    box-shadow: inset 0 0 0 1px #ddd;
}
.minute-tick {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 2px;
    height: 8px;
    border-radius: 999px;
    background: #222;
    transform: translate(-50%, -50%) rotate(calc(var(--tick) * 6deg)) translateY(-101px);
    transform-origin: center;
    z-index: 1;
}
.minute-tick:nth-child(5n + 1) {
    width: 4px;
    height: 12px;
}
.hour { position: absolute; z-index: 2; font-size: 24px; font-weight: 700; transform: translate(-50%, -50%); }
.h12 { left: 50%; top: 15%; } .h1 { left: 68%; top: 20%; } .h2 { left: 81%; top: 32%; }
.h3 { left: 86%; top: 50%; } .h4 { left: 81%; top: 68%; } .h5 { left: 68%; top: 80%; }
.h6 { left: 50%; top: 85%; } .h7 { left: 32%; top: 80%; } .h8 { left: 19%; top: 68%; }
.h9 { left: 14%; top: 50%; } .h10 { left: 19%; top: 32%; } .h11 { left: 32%; top: 20%; }
.clock-watermark {
    position: absolute;
    z-index: 1;
    left: 50%;
    top: calc(50% - 20px);
    max-width: 68%;
    color: #1c2430;
    opacity: .2;
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    transform: translate(-50%, -50%);
    text-transform: uppercase;
    pointer-events: none;
}
.hand {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 50%;
    transform-origin: bottom center;
    border-radius: 999px;
    background: #151515;
}
.hour-hand { width: 7px; height: 58px; margin-left: -3.5px; }
.minute-hand { width: 5px; height: 82px; margin-left: -2.5px; }
.second-hand { width: 2px; height: 94px; margin-left: -1px; background: #d51f35; }
.pin { position: absolute; z-index: 4; width: 14px; height: 14px; border-radius: 50%; background: #111; left: calc(50% - 7px); top: calc(50% - 7px); }
.clock-date {
    font-size: 22px;
    font-weight: 700;
    padding-left: 10px;
    text-shadow: 0 1px 2px rgba(0,0,0,.35);
}
.digital-time {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: 1em;
    padding-left: 10px;
    font-size: clamp(91px, 14.52vw, 161px);
    line-height: 1;
    font-weight: 300;
    letter-spacing: 0;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    white-space: nowrap;
    text-shadow: 0 2px 2px rgba(0,0,0,.25);
}
.clock-facts-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 22px;
    margin-top: 12px;
    padding-left: 10px;
    color: rgba(255,255,255,.9);
    font-size: 18px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,.35);
}
.segmented-control {
    display: inline-flex;
    gap: 3px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}
.segmented-control button {
    min-width: 46px;
    border: 0;
    border-radius: 6px;
    padding: 6px 10px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.1;
    cursor: pointer;
}
.segmented-control button.is-active {
    background: #f4f7fb;
    color: var(--accent);
}
.time-suffix {
    align-self: flex-start;
    font-size: .15em;
    font-weight: 700;
    line-height: 1;
    margin-top: .18em;
    margin-left: .08em;
    vertical-align: top;
}
.clock-timezone {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}
.clock-timezone img {
    width: 24px;
    height: 18px;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,.45);
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.location-preview {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-self: center;
    width: 100%;
    min-height: calc(var(--clock-map-height) + 58px);
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 8px;
    padding: 12px;
    background: rgba(255,255,255,.08);
    color: #fff;
    text-align: left;
    cursor: pointer;
}
.location-preview:hover {
    background: rgba(255,255,255,.12);
}
.location-map-mini,
.location-map-large {
    display: block;
    overflow: hidden;
    border-radius: 8px;
    background: #d8edf5;
}
.location-map-mini {
    width: 100%;
    height: var(--clock-map-height);
    min-height: var(--clock-map-height);
}
.location-preview-text {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    margin-top: auto;
    margin-bottom: 5px;
}
.location-preview-text strong {
    font-size: 17px;
    min-width: 0;
}
.location-preview-text small {
    color: rgba(255,255,255,.82);
    white-space: nowrap;
}
.location-map-expanded {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: -10px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    box-shadow: var(--shadow);
}
.location-map-expanded[hidden] {
    display: none;
}
.location-map-large {
    height: 560px;
}
.location-map-meta {
    align-self: auto;
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}
.location-map-title {
    display: inline;
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
    font-weight: 800;
}
.location-map-meta p {
    margin: 0;
}
.section-grid { display: grid; gap: 24px; margin: 14px 0; }
.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
section:not(.clock-panel):not(.admin-box):not(.empty-state):not(.difference-page):not(.calendar-page):not(.month-card):not(.stopwatch-page):not(.stopwatch-laps) { margin: 12px 0; }
.market-time {
    margin: 14px 0;
}
.ad-block {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    box-shadow: var(--shadow);
}
.ad-block:empty {
    display: none;
}
.market-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 48px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 18px;
    box-shadow: var(--shadow);
}
.market-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: baseline;
    color: var(--accent);
    border-bottom: 1px solid var(--line);
    padding: 10px 0;
    min-width: 0;
}
.market-card:hover {
    text-decoration: none;
}
.market-city {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 400;
    min-width: 0;
}
.market-city img {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border: 1px solid #d5dce8;
    border-radius: 2px;
    flex: 0 0 auto;
}
.market-city span {
    min-width: 0;
}
.market-zone {
    display: none;
}
.market-card strong {
    color: var(--ink);
    font-family: Consolas, "Courier New", monospace;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0;
    white-space: nowrap;
}
.country-time-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 48px;
    padding: 10px 18px;
}
.country-time-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: baseline;
    color: var(--accent);
    border-bottom: 1px solid var(--line);
    padding: 10px 0;
    min-width: 0;
}
.country-time-card:hover {
    text-decoration: none;
}
.country-time-card strong {
    color: var(--ink);
    font-family: Consolas, "Courier New", monospace;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0;
    white-space: nowrap;
}
.link-table, .plain-list, .country-list, .region-list, .country-time-grid {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    box-shadow: var(--shadow);
}
.link-table { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px 18px; }
.link-table.wide { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.region-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px 32px;
}
.time-list-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #edf1f6;
    min-width: 0;
}
.time-list-row a {
    min-width: 0;
}
.time-list-row span[data-mini-time] {
    color: var(--ink);
    font-family: Consolas, "Courier New", monospace;
    white-space: nowrap;
}
.plain-list, .country-list { column-width: 210px; }
.plain-list a, .country-list a { display: block; padding: 5px 0; break-inside: avoid; }
.flags-list {
    column-width: 230px;
}
.flags-list a {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 28px;
}
.flags-list img {
    width: 22px;
    height: 16px;
    object-fit: cover;
    border: 1px solid #d5dce8;
    border-radius: 2px;
    flex: 0 0 auto;
}
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.info-grid > div, .admin-box, .empty-state {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 22px;
    box-shadow: var(--shadow);
}
.facts-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 28px;
    margin: 0;
}
.facts-grid > div {
    border-top: 1px solid var(--line);
    padding: 9px 0;
}
.facts-grid dt {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 3px;
}
.facts-grid dd {
    margin: 0;
    font-weight: 700;
    line-height: 1.3;
}

.form, .seo-form { display: grid; gap: 16px; }
.seo-form > details {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}
.seo-form > details > summary {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 54px;
    padding: 14px 48px 14px 16px;
    color: var(--ink);
    background: #f8fbff;
    font-weight: 800;
    line-height: 1.25;
    cursor: pointer;
    user-select: none;
    list-style: none;
}
.seo-form > details > summary::-webkit-details-marker {
    display: none;
}
.seo-form > details > summary::after {
    content: "";
    position: absolute;
    right: 18px;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg);
    transition: transform .18s ease, border-color .18s ease;
}
.seo-form > details[open] > summary {
    border-bottom: 1px solid var(--line);
    background: #eef3fb;
}
.seo-form > details[open] > summary::after {
    transform: rotate(225deg);
    border-color: var(--accent);
}
.seo-form > details > fieldset {
    border: 0;
    border-radius: 0;
    padding: 16px;
}
.seo-form > details > fieldset > legend {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
label { display: grid; gap: 7px; font-weight: 700; }
input, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px 12px;
    font: inherit;
    font-weight: 400;
}
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
}
.checkbox-label input {
    width: auto;
}
button, .button-link {
    border: 0;
    border-radius: 6px;
    padding: 11px 16px;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}
.admin-box {
    width: 100%;
    max-width: none;
    margin: 0 auto;
}
.admin-box > h1,
.admin-head h1 {
    margin: 0;
    padding-left: 0;
}
.admin-box > h1 {
    margin-bottom: 24px;
}
.wide-box { max-width: none; }
.admin-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 16px; }
legend { font-weight: 800; padding: 0 8px; }
.notice { background: #e8f7ec; border: 1px solid #b8e3c2; color: #1f6b32; padding: 10px 12px; border-radius: 6px; }
.notice.error { background: #fff0f0; border-color: #f2b7b7; color: #9f2424; }
.muted { color: var(--muted); }

@media (max-width: 1180px) {
    .site-header-wrap, .site-footer, .page {
        width: min(100% - 64px, 1320px);
    }
    h1 {
        font-size: clamp(34px, 4.2vw, 42px);
    }
    .clock-panel {
        --clock-map-width: 100%;
        --clock-map-height: 190px;
        grid-template-columns: 251px minmax(0, 1fr);
        gap: 16px 28px;
        padding: 22px;
    }
    .clock-main {
        min-width: 0;
    }
    .clock-date {
        padding-left: 0;
        font-size: 21px;
    }
    .digital-time {
        padding-left: 0;
        font-size: clamp(98px, 12vw, 124px);
    }
    .clock-facts-row {
        padding-left: 0;
        gap: 9px 18px;
        font-size: 17px;
    }
    .location-preview {
        grid-column: 1 / -1;
        width: 100%;
        min-height: auto;
        padding: 10px;
    }
    .location-map-mini {
        height: var(--clock-map-height);
        min-height: var(--clock-map-height);
    }
    .difference-hero {
        grid-template-columns: minmax(0, 1fr) 112px minmax(0, 1fr);
        gap: 14px;
        padding: 24px;
        overflow: hidden;
    }
    .diff-city h2 {
        font-size: 26px;
    }
    .diff-date {
        font-size: 16px;
        line-height: 1.35;
    }
    .diff-time {
        font-size: clamp(76px, 9vw, 92px);
    }
    .diff-city p {
        font-size: 16px;
        gap: 7px;
    }
    .diff-badge {
        width: 112px;
        height: 112px;
        border-width: 7px;
    }
    .diff-badge strong {
        font-size: 34px;
    }
    .diff-badge span {
        font-size: 16px;
    }
    .difference-picker {
        grid-template-columns: minmax(0, 1fr) 50px minmax(0, 1fr);
    }
    .diff-submit {
        grid-column: 1 / -1;
        width: 100%;
    }
    .difference-table-layout {
        grid-template-columns: 1fr;
        gap: 22px;
    }
    .difference-dial {
        position: static;
        min-height: 320px;
        order: -1;
    }
    .dial-face {
        width: 300px;
        height: 300px;
    }
    .dial-tick {
        transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-122px);
    }
    .dial-marker {
        transform: rotate(var(--angle, 0deg)) translateY(-114px);
    }
}

@media (max-width: 980px) {
    .market-grid, .country-time-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0 24px;
    }
}

@media (max-width: 860px) {
    .site-header-wrap, .site-footer, .page { width: min(100% - 40px, 1320px); }
    .tool-grid,
    .tool-grid.compact-grid,
    .tool-result-grid {
        grid-template-columns: 1fr;
    }
    .tool-panel {
        padding: 18px;
    }
    .timer-display {
        min-height: 140px;
    }
    .site-header {
        grid-template-columns: 1fr auto auto;
        align-items: center;
    }
    .brand { grid-column: 1; }
    .header-time-format { grid-column: 2; grid-row: 1; }
    .header-menu { grid-column: 3; grid-row: 1; }
    .header-menu-links {
        right: 0;
        min-width: min(520px, calc(100vw - 40px));
    }
    .header-search { grid-column: 1 / -1; }
    .page-head { gap: 4px; }
    .clock-panel { grid-template-columns: 1fr; text-align: center; }
    .clock-face { margin: 0 auto; }
    .digital-time {
        padding-left: 0;
        justify-content: center;
    }
    .location-preview {
        justify-self: center;
        width: min(100%, var(--clock-map-width));
        text-align: left;
    }
    .location-map-expanded { grid-template-columns: 1fr; }
    .clock-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); text-align: left; }
    .two-columns, .info-grid, .facts-grid { grid-template-columns: 1fr; }
    .difference-picker,
    .difference-hero,
    .difference-table-layout {
        grid-template-columns: 1fr;
    }
    .year-calendar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .city-age-detail-grid {
        grid-template-columns: 1fr;
    }
    .days-until-link-grid,
    .days-until-day-grid,
    .days-until-weekday-grid,
    .days-until-months-layout,
    .days-until-detail-list.has-variants,
    .days-until-total-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .stopwatch-controls {
        gap: 12px;
    }
    .diff-badge {
        margin: 0 auto;
    }
    .variable-grid { grid-template-columns: 1fr; }
    .market-grid, .country-time-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
    .link-table, .link-table.wide, .region-list { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
    .site-header-wrap, .site-footer, .page { width: min(100% - 28px, 1320px); }
    .tool-panel {
        padding: 14px;
    }
    .tool-actions,
    .tool-weekdays {
        gap: 9px;
    }
    .tool-result-item {
        min-height: 72px;
    }
    .tool-table th,
    .tool-table td {
        padding: 8px 7px;
        font-size: 14px;
        overflow-wrap: anywhere;
    }
    .brand {
        grid-column: 1;
    }
    .header-search {
        grid-column: 1 / -1;
        min-width: 0;
    }
    .header-menu {
        grid-column: 3;
        grid-row: 1;
        align-self: center;
    }
    .header-menu-links {
        grid-template-columns: 1fr;
        min-width: calc(100vw - 28px);
        max-width: calc(100vw - 28px);
    }
    .site-header {
        grid-template-columns: minmax(0, 1fr) auto auto;
        padding: 10px 12px;
        gap: 12px;
    }
    .header-time-format { grid-column: 2; grid-row: 1; }
    .header-menu { grid-column: 3; }
    .live-search input { height: 34px; }
    h1, section > h2, .breadcrumbs { padding-left: 0; }
    .calendar-head h1,
    .calendar-head p {
        padding-left: 0;
    }
    .calendar-actions {
        width: 100%;
        justify-content: flex-start;
    }
    .year-calendar {
        grid-template-columns: 1fr;
    }
    .stopwatch-page,
    .city-age-page,
    .days-until-page,
    .epoch-page {
        gap: 0;
    }
    .stopwatch-panel,
    .city-age-detail-card,
    .days-until-detail,
    .epoch-panel {
        padding: 18px;
    }
    .days-until-link-grid,
    .days-until-day-grid,
    .days-until-weekday-grid,
    .days-until-months-layout,
    .days-until-detail-list.has-variants,
    .days-until-detail-head,
    .days-until-total-grid {
        grid-template-columns: 1fr;
    }
    .days-until-link-grid,
    .days-until-day-grid {
        padding: 14px;
        gap: 4px;
    }
    .days-until-main-counter {
        justify-content: flex-start;
        text-align: left;
    }
    .time-calc-select-row,
    .time-calc-mode,
    .time-calc-between,
    .time-calc-variants {
        font-size: 20px;
    }
    .time-calc-select-row select,
    .time-calc-mode select {
        min-width: 64px;
        font-size: 20px;
    }
    .time-calc-result {
        padding: 16px;
    }
    .time-calc-inputs {
        grid-template-columns: 1fr;
    }
    .time-calc-date-row {
        grid-template-columns: 1fr;
    }
    .time-calc-select-row {
        grid-template-columns: 1fr;
    }
    .time-calc-mode {
        grid-column: auto;
    }
    .time-calc-main-result,
    .time-calc-compact strong {
        font-size: 30px;
    }
    .time-calc-words,
    .time-calc-compact span,
    .time-calc-between-words {
        font-size: 18px;
    }
    .city-age-intro {
        padding: 0;
        font-size: 16px;
        text-align: left;
    }
    .city-age-table-head,
    .city-age-table-row {
        grid-template-columns: 1fr;
        gap: 4px;
        padding: 10px 0;
        text-align: left;
    }
    .city-age-table-head {
        display: none;
    }
    .epoch-mode-panel.is-active,
    .epoch-date-grid,
    .epoch-result-grid > div {
        grid-template-columns: 1fr;
    }
    .epoch-tabs {
        width: 100%;
    }
    .epoch-tabs button {
        flex: 1;
        padding-right: 10px;
        padding-left: 10px;
    }
    .epoch-result-grid button {
        width: 100%;
    }
    .stopwatch-timebox {
        width: fit-content;
        margin-right: auto;
        margin-left: auto;
        grid-template-columns: minmax(2ch, auto) .42ch 2ch 1.05ch;
        justify-content: center;
        font-size: clamp(58px, 18vw, 92px);
    }
    .stopwatch-centiseconds {
        font-size: .36em;
    }
    .stopwatch-unit {
        font-size: 13px;
    }
    .stopwatch-controls button {
        min-width: 138px;
        padding: 13px 18px;
        font-size: 18px;
    }
    .stopwatch-laps th,
    .stopwatch-laps td {
        padding: 10px 8px;
        font-size: 16px;
    }
    .clock-panel { padding: 18px; }
    .location-preview {
        width: 100%;
        min-height: auto;
    }
    .location-map-mini {
        height: 190px;
        min-height: 190px;
    }
    .clock-facts { grid-template-columns: 1fr; }
    .clock-facts-row {
        justify-content: center;
        gap: 8px 12px;
        padding-left: 0;
        font-size: 16px;
        line-height: 1.2;
    }
    .segmented-control button {
        padding: 6px 8px;
    }
    .clock-timezone {
        gap: 6px;
        white-space: nowrap;
    }
    .clock-timezone img {
        width: 20px;
        height: 15px;
    }
    .location-map-expanded {
        padding: 14px;
        gap: 12px;
    }
    .location-map-large {
        height: 390px;
    }
    .site-footer { flex-direction: column; }
    .footer-links { justify-content: flex-start; }
    .digital-time { font-size: 77px; }
    .diff-time { font-size: 48px; }
    .difference-picker {
        padding: 14px;
    }
    .difference-hero {
        padding: 22px 16px;
    }
    .difference-table-card {
        overflow: hidden;
    }
    .difference-table-scroll {
        overflow-x: visible;
        padding-bottom: 0;
    }
    .difference-table {
        min-width: 0;
        table-layout: fixed;
    }
    .difference-table th,
    .difference-table td {
        padding: 8px 7px;
        font-size: 14px;
        line-height: 1.2;
        overflow-wrap: anywhere;
    }
    .difference-table th:nth-child(2),
    .difference-table td:nth-child(2) {
        width: 58px;
        padding-right: 4px;
        padding-left: 4px;
    }
    .difference-table span {
        font-size: 11px;
    }
    .difference-table tbody tr.is-now td:first-child::after {
        margin-left: 5px;
        padding: 1px 6px;
        font-size: 11px;
    }
    .difference-dial {
        position: static;
        min-height: 300px;
    }
    .dial-face {
        width: 280px;
        height: 280px;
    }
    .dial-tick {
        transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-112px);
    }
    .dial-marker {
        transform: rotate(var(--angle, 0deg)) translateY(-104px);
    }
    .market-grid { grid-template-columns: 1fr; }
    .country-time-grid { grid-template-columns: 1fr; }
    .market-card { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
}

@media print {
    @page {
        size: A4 portrait;
        margin: 6mm;
    }
    body {
        background: #fff;
    }
    .site-header-wrap,
    .site-footer,
    .calendar-head,
    .breadcrumbs {
        display: none !important;
    }
    .calendar-print-bar {
        display: block;
        margin: 0 0 6px;
    }
    .calendar-print-source {
        display: block;
        margin-top: 6px;
        color: #5f6b7a;
        font-size: 11px;
        font-weight: 700;
    }
    .calendar-print-title {
        display: block;
        margin: 0;
        padding-left: 0;
        font-size: 24px;
        line-height: 1.1;
        font-weight: 800;
    }
    .page {
        width: 100%;
        padding: 0;
    }
    .calendar-page {
        gap: 0;
    }
    .year-calendar {
        grid-template-columns: repeat(3, 1fr);
        gap: 5px;
    }
    .month-card {
        box-shadow: none;
        break-inside: avoid;
        padding: 7px;
        min-height: 0;
    }
    .month-card h2 {
        margin-bottom: 5px;
        font-size: 18px;
    }
    .month-grid {
        gap: 2px;
    }
    .weekday {
        min-height: 16px;
        font-size: 10px;
    }
    .month-day,
    .empty-day {
        min-height: 20px;
        font-size: 12px;
    }
    .month-day {
        border-radius: 3px;
    }
}
