.rlc {
    --rlc-ink: #1c1e21;
    --rlc-dark: #004533;
    --rlc-action: #00ab7b;
    --rlc-rule: #d8e0dc;
    width: min(100%, 960px);
    margin: 0 auto 40px;
    color: var(--rlc-ink);
    font-family: "Noto Sans TC", "Open Sans", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}
.rlc *, .rlc *::before, .rlc *::after { box-sizing: border-box; }
.rlc [hidden] { display: none !important; }
.rlc h1, .rlc h2, .rlc h3 {
    color: var(--rlc-dark);
    margin: 0;
    text-transform: none;
    letter-spacing: normal;
    text-wrap: balance;
}
.rlc .rlc-intro {
    position: relative;
    z-index: 1;
    padding: 24px clamp(18px, 4vw, 48px) 26px;
    border: 1px solid var(--rlc-rule);
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    background: #ebf4eb;
    isolation: isolate;
}
.rlc-intro::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0 0 0 auto;
    width: 24%;
    border-radius: 0 12px 0 0;
    background-image: radial-gradient(#00453345 1.2px, transparent 1.3px);
    background-size: 8px 8px;
    mask-image: linear-gradient(105deg, transparent 4%, black);
}
.rlc .rlc-intro h1 {
    font-size: clamp(32px, 4.6vw, 52px);
    font-weight: 800;
    line-height: 1.16;
}
.rlc .rlc-intro p {
    max-width: 65ch;
    color: #334e44;
    margin: 12px 0 0;
    font-size: 16px;
    line-height: 1.65;
}
.rlc-language { width: fit-content; margin: 0 0 15px auto; position: relative; }
.rlc-language summary, .rlc .rlc-share-link {
    background: white;
    border: 1px solid #828990;
    border-radius: 6px;
    padding: 8px 12px;
    color: var(--rlc-ink);
    font-weight: 600;
    font-size: 16px;
    line-height: 1.6;
    cursor: pointer;
}
.rlc-language summary i { margin-right: 3px; }
.rlc-language ul {
    position: absolute;
    z-index: 2;
    top: 100%;
    right: 0;
    max-height: 290px;
    overflow-y: auto;
    width: max-content;
    max-width: 74vw;
    padding: 4px;
    margin: 4px 0 0;
    border: 1px solid var(--rlc-rule);
    border-radius: 6px;
    background: white;
    box-shadow: 0 6px 14px rgba(0, 42, 32, .12);
    list-style: none;
}
.rlc-language li a { display: block; padding: 6px 14px; color: var(--rlc-dark); }
.rlc-language a[aria-current="true"], .rlc-language a:hover { background: #ebf4eb; }
.rlc-form, .rlc-output {
    padding: clamp(18px, 4vw, 48px);
    background: white;
    border: 1px solid var(--rlc-rule);
    border-radius: 0 0 12px 12px;
}
.rlc-fields {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: clamp(20px, 5vw, 58px);
    align-items: start;
}
.rlc .rlc-distance > label, .rlc .rlc-time legend {
    width: auto;
    float: none;
    padding: 0;
    margin: 0 0 9px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.45;
    color: var(--rlc-ink);
}
.rlc .rlc-time { padding: 0; border: 0; margin: 0; min-width: 0; }
.rlc-clock { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rlc-clock label {
    display: block;
    margin: 0 0 4px;
    font-size: 16px;
    line-height: 1.4;
    color: #4a4f55;
}
.rlc-form select, .rlc-form input:not([type="hidden"]), .rlc-share input {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 8px 10px;
    border: 1px solid #83958d;
    border-radius: 6px;
    color: var(--rlc-ink);
    background-color: white;
    font-family: inherit;
    font-size: 18px;
}
.rlc-form select { cursor: pointer; max-width: 100%; }
.rlc-clock input { text-align: center; font-variant-numeric: tabular-nums; }
.rlc .rlc-form input::placeholder { color: #65746e; opacity: 1; }
.rlc-tenths { display: none; white-space: nowrap; }
.rlc-fields:has(option[data-tenths]:checked) .rlc-tenths { display: inline; }
.rlc .rlc-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    margin-top: 20px;
    padding: 11px 24px;
    border: 1px solid var(--rlc-action);
    border-radius: 8px;
    /* Slightly deepen the VI green so the large white label clears 3:1. */
    background: #00a879;
    color: #fff;
    font: inherit;
    font-size: 20px;
    line-height: 1.4;
    font-weight: 700;
    cursor: pointer;
}
.rlc .rlc-submit:hover, .rlc .rlc-submit:active { background: #007e5c; border-color: #007e5c; }
.rlc :focus-visible { outline: 3px solid #007e5c; outline-offset: 3px; }
.rlc #rlc-result:focus { outline: 0; }
.rlc #rlc-result, .rlc #rlc-errors { scroll-margin-top: 130px; }
.rlc .rlc-notice {
    position: relative;
    padding: 14px 14px 14px 44px;
    border: 1px solid #e8d5b0;
    border-radius: 8px;
    background: #fff8ec;
    color: #7a5200;
}
.rlc .rlc-notice::before {
    content: "\f071";
    position: absolute;
    top: 15px;
    left: 16px;
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}
.rlc .rlc-notice p, .rlc .rlc-notice a { color: inherit; }
.rlc .rlc-notice p { margin: 4px 0 0; }
.rlc .rlc-notice ul { padding-left: 20px; margin: 4px 0 0; }
.rlc .rlc-notice a { text-decoration: underline; }
.rlc-form .rlc-notice { margin-bottom: 20px; }
.rlc .rlc-field-error { display: block; color: #7a5200; font-size: 16px; }
.rlc .rlc-field-error:not(:empty) { margin-top: 5px; }
.rlc-form [aria-invalid="true"] { border-color: #986908 !important; }
.rlc-output { border-radius: 12px; }
.rlc #rlc-result > * { margin-top: 20px; }
.rlc-score { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.rlc .rlc-score h2 { font-size: 18px; font-weight: 700; line-height: 1.5; }
.rlc .rlc-entered { margin: 0; font-size: 18px; font-weight: 600; color: #334e44; }
.rlc-score-value {
    display: block;
    color: var(--rlc-dark);
    font-size: clamp(52px, 7.5vw, 82px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.045em;
    font-variant-numeric: tabular-nums;
}
.rlc .rlc-share-link { display: inline-block; text-decoration: none; }
.rlc .rlc-share-link:hover, .rlc-language summary:hover { color: var(--rlc-ink); border-color: #4a4f55; background: #f5f6f7; }
.rlc-share-status { display: block; color: var(--rlc-dark); font-size: 16px; }
.rlc-share-status:not(:empty), .rlc-share input { margin-top: 8px; }
.rlc-result-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    margin-top: 24px;
}
.rlc-result-options {
    display: flex;
    max-width: 100%;
    border: 1px solid #828990;
    border-radius: 8px;
}
.rlc .rlc-result-options a {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 6px 12px;
    text-align: center;
    color: var(--rlc-ink);
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
}
.rlc .rlc-result-options a:hover { text-decoration: underline; }
.rlc .rlc-result-options a[aria-current="true"] { background: var(--rlc-dark); color: white; }
.rlc-tables {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: clamp(20px, 3.5vw, 40px);
    margin-top: 16px;
}
.rlc .rlc-tables h3 {
    border-top: 2px solid var(--rlc-dark);
    padding: 16px 0 12px;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.35;
}
.rlc-tables table { width: 100%; border-collapse: collapse; font-size: 16px; }
.rlc-tables th, .rlc-tables td {
    padding: 10px 5px;
    border-bottom: 1px solid var(--rlc-rule);
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.rlc-tables th:first-child { text-align: left; }
.rlc-tables thead th { color: #4a4f55; vertical-align: bottom; font-size: 16px; font-weight: 600; line-height: 1.45; }
.rlc-tables td { white-space: nowrap; }
.rlc-tables .rlc-selected { color: var(--rlc-dark); background: #ebf4eb; }
.rlc-zone { font-weight: 700; color: var(--rlc-dark); }
.rlc-foot { margin: 16px 2px 0; }
.rlc .rlc-foot p { margin: 0; color: #4a4f55; font-size: 16px; }
.rlc-foot a { display: inline-block; padding: 7px 0; margin-right: 12px; color: #006747; text-decoration: underline; }
@media (min-width: 721px) {
    .rlc-clock > div {
        display: grid;
        grid-template-areas: "input" "unit" "error";
        align-content: start;
    }
    .rlc-clock input { grid-area: input; }
    .rlc-clock label { grid-area: unit; margin: 4px 0 0; text-align: center; }
    .rlc-clock .rlc-field-error { grid-area: error; }
}
@media (max-width: 720px) {
    .rlc-fields, .rlc-tables { grid-template-columns: minmax(0, 1fr); }
    .rlc-clock > div {
        display: grid;
        grid-template-rows: subgrid;
        grid-row: span 3;
        row-gap: 0;
    }
}
@media (max-width: 480px) {
    .rlc .rlc-submit { width: 100%; }
    .rlc-tables th, .rlc-tables td { padding: 9px 3px; }
    .rlc-clock { gap: 6px; }
}
