.surfarea-tide-page {
    margin: 16px 0;
    max-width: 100%;
    width: 100%;
}

.surfarea-tide-page,
.surfarea-tide-page * {
    box-sizing: border-box;
}

.surfarea-tide-hero {
    border: 1px solid #d9e5df;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(18, 47, 37, 0.06);
    background: #ffffff;
    padding: 16px;
    margin-bottom: 14px;
}

.surfarea-tide-hero__title {
    margin: 0;
    color: #1b4a3c;
    font-size: 30px;
    line-height: 1.35;
}

.surfarea-tide-hero__sub {
    margin: 8px 0 0;
    color: #46685a;
    font-size: 14px;
}

.surfarea-tide-area-grid,
.surfarea-tide-point-grid {
    margin: 0 !important;
    padding: 0 !important;
    padding-inline-start: 0 !important;
    margin-inline-start: 0 !important;
    list-style: none !important;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
}

.surfarea-tide-area-grid > li,
.surfarea-tide-point-grid > li {
    list-style: none !important;
    margin: 0 !important;
}

.surfarea-tide-area-grid > li::marker,
.surfarea-tide-point-grid > li::marker,
.surfarea-tide-area-grid > li::before,
.surfarea-tide-point-grid > li::before {
    content: none !important;
    display: none !important;
}

.surfarea-tide-area-card,
.surfarea-tide-point-card,
.surfarea-tide-card {
    border: 1px solid #e2ebe7;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(18, 47, 37, 0.05);
    padding: 14px;
}

.surfarea-tide-area-card__title,
.surfarea-tide-point-card__title,
.surfarea-tide-card__title {
    margin: 0 0 8px;
    color: #1b4a3c;
    font-size: 22px;
    line-height: 1.35;
}

.surfarea-tide-area-card__meta,
.surfarea-tide-point-card__meta,
.surfarea-tide-card p {
    margin: 6px 0 0;
    color: #355f52;
}

.surfarea-tide-area-card__meta,
.surfarea-tide-point-card__meta {
    font-size: 14px;
    line-height: 1.5;
}

.surfarea-tide-area-card__actions,
.surfarea-tide-point-card__actions {
    margin: 10px 0 0;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.surfarea-tide-card {
    margin-top: 12px;
}

.surfarea-tide-card--graph-main {
    max-width: 1080px;
    margin-left: auto;
    margin-right: auto;
    padding: 18px 20px;
}

.surfarea-tide-card--graph-main .surfarea-tide-card__title {
    font-size: 26px;
    margin-bottom: 12px;
}

.surfarea-tide-card ul {
    margin: 8px 0 0 !important;
    padding: 0 !important;
    padding-inline-start: 0 !important;
    list-style: none !important;
}

.surfarea-tide-card ul > li {
    list-style: none !important;
    margin: 0;
    padding: 2px 0;
}

.surfarea-tide-date-nav {
    margin: 0;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.surfarea-tide-date-form {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.surfarea-tide-date-form input[type="date"] {
    min-height: 44px;
    border: 1px solid #c8ddd4;
    border-radius: 10px;
    padding: 8px 10px;
}

.surfarea-tide-map-preview {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 420px;
    width: 100%;
}

.surfarea-tide-map-preview iframe {
    display: block;
    width: 100%;
    min-height: 220px;
    border: 1px solid #d9e5df;
    border-radius: 10px;
    background: #f7fbf9;
}

.surfarea-tide-map-preview a {
    font-size: 13px;
    color: #355f52;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.surfarea-tide-map-preview:hover iframe,
.surfarea-tide-map-preview:focus-within iframe {
    border-color: #b7d2c7;
}

@media (max-width: 767px) {
    .surfarea-tide-map-preview {
        max-width: 100%;
    }

    .surfarea-tide-map-preview iframe {
        min-height: 200px;
    }
}

.surfarea-tide-graph-wrap {
    width: 100%;
    overflow: hidden;
    border: 1px solid #d9e5df;
    border-radius: 10px;
    background: #f8fbfa;
}

.surfarea-tide-graph {
    width: 100%;
    height: auto;
    display: block;
}

.surfarea-tide-day-summary {
    margin-top: 12px;
    border: 1px solid #d9e5df;
    border-radius: 10px;
    background: #f7fbf9;
    padding: 12px 14px;
}

.surfarea-tide-day-summary__date {
    margin: 0 0 6px;
    color: #1f5d4b;
    font-size: 15px;
    font-weight: 700;
}

.surfarea-tide-day-summary__line {
    margin: 0;
    padding: 3px 0;
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 8px;
    align-items: baseline;
    color: #214e41;
    font-size: 17px;
    font-weight: 600;
}

.surfarea-tide-day-summary__label {
    color: #46685a;
    font-size: 14px;
    font-weight: 700;
}

.surfarea-tide-graph__bg {
    fill: #f8fbfa;
}

.surfarea-tide-graph__grid {
    stroke: #d2e2da;
    stroke-width: 1;
}

.surfarea-tide-graph__tick {
    stroke: #e5efeb;
    stroke-width: 1;
}

.surfarea-tide-graph__day {
    stroke: #8fb1a3;
    stroke-width: 1.2;
    stroke-dasharray: 4 4;
}

.surfarea-tide-graph__line {
    fill: none;
    stroke: #2c7e67;
    stroke-width: 2.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.surfarea-tide-graph__now {
    stroke: #d24c3f;
    stroke-width: 1.5;
    stroke-dasharray: 5 4;
}

/* BCM形式：峰/谷から上端/下端への投影点線 */
.surfarea-tide-graph__project {
    stroke: #aac8bc;
    stroke-width: 1;
    stroke-dasharray: 3 3;
}

.surfarea-tide-graph__marker {
    stroke: #ffffff;
    stroke-width: 2;
}

.surfarea-tide-graph__marker--high {
    fill: #1f6dd6;
}

.surfarea-tide-graph__marker--low {
    fill: #f28a2e;
}

/* SVGテキスト基本サイズ：CSS は SVG presentation attribute を上書きするため px 指定が必須 */
.surfarea-tide-graph__axis {
    fill: #2f5b4e;
    font-size: 35px;
}

.surfarea-tide-graph__axis--y {
    font-size: 20px;
    font-weight: 600;
}

.surfarea-tide-graph__axis--date {
    fill: #2f5b4e;
    font-size: 35px;
    font-weight: 700;
}

.surfarea-tide-graph__axis--event {
    fill: #1b4a3c;
    font-size: 30px;
    font-weight: 700;
}

.surfarea-tide-graph__label {
    fill: #2f5b4e;
    font-size: 30px;
    paint-order: stroke;
    stroke: #f8fbfa;
    stroke-width: 4px;
    font-weight: 700;
}

.surfarea-tide-graph__label--high {
    fill: #1a5bc0;
}

.surfarea-tide-graph__label--low {
    fill: #b6641d;
}

.surfarea-tide-graph-empty,
.surfarea-tide-error-message {
    margin: 0;
    color: #46685a;
}

.surfarea-tide-card--split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.surfarea-tide-hourly-table {
    margin-top: 12px;
    border: 1px solid #d9e5df;
    border-radius: 10px;
    background: #ffffff;
    color: #214e41;
    padding: 10px;
}

.surfarea-tide-hourly-table__title {
    margin: 0 0 8px;
    font-size: 13px;
    color: #1f5d4b;
}

.surfarea-tide-hourly-table__note {
    margin-left: 6px;
    color: #55766a;
    font-size: 11px;
    font-weight: 400;
}

.surfarea-tide-hourly-table__pre {
    margin: 0;
    padding: 0;
    font-family: Menlo, Consolas, monospace;
    font-size: 16px;
    line-height: 1.35;
    color: #1f5d4b;
    text-align: left !important;
    white-space: pre;
    overflow-x: auto;
}

.surfarea-tide-hourly-table table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

.surfarea-tide-hourly-table td {
    font-family: Menlo, Consolas, monospace;
    font-size: 16px;
    line-height: 1.35;
    padding: 0;
    text-align: left !important;
}

.surfarea-tide-hourly-table__line {
    color: #1f5d4b;
    display: flex;
    justify-content: flex-start;
    align-items: baseline;
    text-align: left !important;
    padding-left: 0;
    white-space: nowrap;
}

.surfarea-tide-hourly-table__line-text {
    display: inline-block;
    margin: 0;
    padding: 0;
    text-align: left !important;
}

.surfarea-tide-hourly-table tr,
.surfarea-tide-hourly-table tr:nth-child(odd),
.surfarea-tide-hourly-table tr:nth-child(even) {
    background: transparent !important;
}

.surfarea-tide-source-notice {
    margin: 12px 0;
    border: 1px solid #d9e5df;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(18, 47, 37, 0.04);
    padding: 12px 14px;
    color: #355f52;
    font-size: 13px;
    line-height: 1.7;
}

.surfarea-tide-source-notice--detail {
    background: #fbfefd;
}

.surfarea-tide-source-notice__title {
    margin: 0 0 6px;
    color: #1b4a3c;
    font-size: 18px;
    line-height: 1.35;
}

.surfarea-tide-source-notice p {
    margin: 8px 0 0;
    color: #355f52;
}

.surfarea-tide-source-notice a {
    color: #1f6f58;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.surfarea-tide-source-notice__links {
    display: flex;
    gap: 8px 12px;
    flex-wrap: wrap;
    align-items: center;
}

.surfarea-tide-source-notice__links a {
    display: inline-flex;
    max-width: 100%;
    overflow-wrap: anywhere;
}

@media (max-width: 767px) {
    .surfarea-tide-area-grid,
    .surfarea-tide-point-grid,
    .surfarea-tide-card--split {
        grid-template-columns: minmax(0, 1fr);
    }

    .surfarea-tide-hero,
    .surfarea-tide-card,
    .surfarea-tide-area-card,
    .surfarea-tide-point-card {
        padding: 12px;
    }

    .surfarea-tide-hero__title {
        font-size: 26px;
    }

    .surfarea-tide-card--graph-main {
        padding: 12px;
    }

    .surfarea-tide-card--graph-main .surfarea-tide-card__title {
        font-size: 22px;
    }

    .surfarea-tide-date-form {
        align-items: stretch;
    }

    .surfarea-tide-date-form input[type="date"],
    .surfarea-tide-date-form button,
    .surfarea-tide-date-nav .surfarea-wave-button,
    .surfarea-tide-point-card__actions .surfarea-wave-button,
    .surfarea-tide-area-card__actions .surfarea-wave-button {
        width: 100%;
    }

    .surfarea-tide-graph__label {
        font-size: 32px;
        stroke-width: 3px;
        font-weight: 700;
    }

    .surfarea-tide-graph__axis {
        font-size: 32px;
    }

    .surfarea-tide-graph__axis--event {
        font-size: 32px;
    }

    .surfarea-tide-graph__axis--date {
        font-size: 32px;
    }

    .surfarea-tide-day-summary {
        padding: 10px 12px;
    }

    .surfarea-tide-day-summary__date {
        font-size: 16px;
    }

    .surfarea-tide-day-summary__line {
        grid-template-columns: 78px minmax(0, 1fr);
        font-size: 16px;
        line-height: 1.5;
    }

    .surfarea-tide-day-summary__label {
        font-size: 15px;
    }

    .surfarea-tide-source-notice {
        padding: 10px 12px;
        font-size: 12px;
        line-height: 1.65;
    }

    .surfarea-tide-source-notice__title {
        font-size: 17px;
    }

    .surfarea-tide-source-notice__links {
        align-items: stretch;
        flex-direction: column;
    }
}
