.page-collection-memos {
    background: #082f31;
}

.memo-guide {
    --memo-ink: #183a36;
    --memo-deep: #075653;
    --memo-deep-dark: #043f3e;
    --memo-paper: #fffdf1;
    --memo-cream: #fff9dc;
    --memo-gold: #e5b447;
    --memo-gold-light: #ffe584;
    --memo-green: #4f9b43;
    --memo-blue: #147d9e;
    --memo-red: #b84635;
    --memo-muted: #3f564f;
    --memo-line: #183a36;
    background: var(--memo-cream);
    overflow-wrap: anywhere;
}

.memo-guide h1,
.memo-guide h2,
.memo-guide h3,
.memo-guide p,
.memo-guide ol,
.memo-guide ul,
.memo-guide dl,
.memo-guide figure,
.memo-guide table {
    margin-top: 0;
}

.memo-guide h1,
.memo-guide h2,
.memo-guide h3,
.memo-guide p,
.memo-guide li,
.memo-guide dd,
.memo-guide dt,
.memo-guide a,
.memo-guide span,
.memo-guide button,
.memo-guide label,
.memo-guide td,
.memo-guide th {
    overflow-wrap: anywhere;
}

.memo-guide [id] {
    scroll-margin-top: 104px;
}

.memo-guide button,
.memo-guide select,
.memo-guide input {
    font: inherit;
}

.memo-guide a:focus-visible,
.memo-guide button:focus-visible,
.memo-guide select:focus-visible,
.memo-guide input:focus-visible {
    outline: 3px solid #ffea82;
    outline-offset: 3px;
}

.memo-hero {
    position: relative;
    overflow: hidden;
    color: #fffdf0;
    background-color: #2f6b3f;
    background-image:
        linear-gradient(118deg, rgba(4, 63, 62, 0.96) 0%, rgba(7, 86, 83, 0.9) 48%, rgba(62, 122, 52, 0.82) 100%),
        url("../images/grass-tile.webp");
    background-repeat: repeat;
    background-size: auto, 96px 96px;
    border-bottom: 8px solid var(--memo-gold);
}

.memo-hero::before,
.memo-hero::after {
    position: absolute;
    content: "";
    pointer-events: none;
    border-radius: 50%;
}

.memo-hero::before {
    width: 340px;
    height: 340px;
    right: -120px;
    bottom: -160px;
    border: 40px solid rgba(255, 229, 132, 0.1);
}

.memo-hero::after {
    width: 210px;
    height: 210px;
    top: -100px;
    left: -70px;
    border: 28px solid rgba(79, 155, 67, 0.18);
}

.memo-hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    width: min(calc(100% - 48px), 1220px);
    margin: 0 auto;
    padding: 56px 0 62px;
    grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
    gap: 40px;
    align-items: center;
}

.memo-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 14px;
    color: rgba(255, 253, 240, 0.82);
    font-size: 13px;
    font-weight: 700;
}

.memo-breadcrumbs a {
    color: #ffe584;
    text-decoration: none;
}

.memo-breadcrumbs a:hover {
    text-decoration: underline;
}

.memo-kicker {
    margin-bottom: 10px;
    color: #ffe584;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.memo-hero h1 {
    margin-bottom: 14px;
    color: #fffdf0;
    font-size: clamp(34px, 5vw, 52px);
    line-height: 1.08;
    letter-spacing: -0.02em;
}

.memo-lead {
    margin-bottom: 22px;
    color: rgba(255, 253, 240, 0.94);
    font-size: 18px;
    line-height: 1.55;
    font-weight: 650;
    max-width: 38rem;
}

.memo-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.memo-primary-action,
.memo-secondary-action,
.memo-secondary-btn,
.memo-ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    border: 3px solid var(--memo-line);
    box-shadow: 4px 4px 0 rgba(3, 48, 47, 0.22);
}

.memo-primary-action {
    color: var(--memo-deep-dark);
    background: linear-gradient(180deg, #ffe584 0%, #e5b447 100%);
}

.memo-secondary-action,
.memo-ghost-btn {
    color: #fffdf0;
    background: rgba(4, 63, 62, 0.45);
}

.memo-secondary-btn {
    color: var(--memo-deep-dark);
    background: #dff3d4;
}

.memo-primary-action:hover,
.memo-secondary-action:hover,
.memo-secondary-btn:hover,
.memo-ghost-btn:hover {
    transform: translateY(-1px);
}

.memo-hero-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.memo-hero-stats div {
    padding: 12px 10px;
    border: 2px solid rgba(255, 253, 240, 0.28);
    border-radius: 12px;
    background: rgba(4, 63, 62, 0.35);
    text-align: center;
}

.memo-hero-stats dt {
    margin-bottom: 4px;
    color: rgba(255, 253, 240, 0.78);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.memo-hero-stats dd {
    margin: 0;
    color: #fffdf0;
    font-size: 22px;
    font-weight: 900;
}

.memo-answer-card {
    padding: 22px;
    border: 4px solid var(--memo-line);
    border-radius: 18px;
    background: linear-gradient(180deg, #fffdf1 0%, #fff4cf 100%);
    color: var(--memo-ink);
    box-shadow: 10px 10px 0 rgba(3, 48, 47, 0.18);
}

.memo-answer-heading {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
}

.memo-leaf {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 3px solid var(--memo-line);
    background:
        radial-gradient(circle at 35% 30%, #fff 0 16%, transparent 17%),
        linear-gradient(145deg, #8fd46a 0%, #3f8f3a 100%);
    box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.08);
}

.memo-answer-heading p {
    margin: 0 0 2px;
    color: #2f6b3f;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.memo-answer-heading h2 {
    margin: 0;
    color: var(--memo-deep-dark);
    font-size: 22px;
    line-height: 1.2;
}

.memo-answer-card ol {
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.memo-answer-card li {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.memo-answer-card li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--memo-line);
    background: #dff3d4;
    color: var(--memo-deep-dark);
    font-size: 13px;
    font-weight: 900;
}

.memo-answer-card li p {
    margin: 0;
    color: var(--memo-ink);
    font-size: 14px;
    line-height: 1.45;
    font-weight: 700;
}

.memo-answer-note {
    margin: 0;
    padding-top: 12px;
    border-top: 2px dashed #c8d7b4;
    color: var(--memo-muted);
    font-size: 13px;
    line-height: 1.45;
    font-weight: 700;
}

.memo-page-layout {
    display: grid;
    width: min(calc(100% - 48px), 1220px);
    margin: 0 auto;
    padding: 34px 0 56px;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 28px;
    align-items: start;
}

.memo-main-column,
.memo-side-column {
    min-width: 0;
}

.memo-side-column {
    position: sticky;
    top: 88px;
    display: grid;
    gap: 16px;
}

.memo-section {
    margin-bottom: 22px;
    padding: 24px;
    border: 4px solid var(--memo-line);
    border-radius: 16px;
    background: var(--memo-paper);
    box-shadow: 8px 8px 0 rgba(3, 48, 47, 0.12);
}

.memo-section-heading {
    margin-bottom: 18px;
}

.memo-section-heading p {
    margin-bottom: 6px;
    color: #2f6b3f;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.memo-section-heading h2 {
    margin-bottom: 8px;
    color: var(--memo-deep-dark);
    font-size: clamp(24px, 3vw, 32px);
    line-height: 1.15;
}

.memo-section-heading span {
    display: block;
    color: var(--memo-muted);
    font-size: 15px;
    line-height: 1.5;
    font-weight: 650;
}

.memo-section-heading.is-light p,
.memo-section-heading.is-light h2,
.memo-section-heading.is-light span {
    color: #fffdf0;
}

.memo-section-heading.is-light span {
    color: rgba(255, 253, 240, 0.88);
}

.memo-method-grid,
.memo-story-grid,
.memo-swim-grid,
.memo-steps-grid,
.memo-faq-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.memo-method-grid article,
.memo-story-grid article,
.memo-swim-grid article,
.memo-steps-grid article,
.memo-faq-grid article {
    min-width: 0;
    padding: 16px;
    border: 3px solid var(--memo-line);
    border-radius: 12px;
    background: linear-gradient(180deg, #fffdf8 0%, #f3f8ea 100%);
}

.memo-method-grid p,
.memo-story-grid p,
.memo-steps-grid p {
    margin-bottom: 6px;
    color: #2f6b3f;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.memo-method-grid h3,
.memo-story-grid h3,
.memo-swim-grid h3,
.memo-steps-grid h3,
.memo-faq-grid h3 {
    margin-bottom: 8px;
    color: var(--memo-deep-dark);
    font-size: 18px;
    line-height: 1.25;
}

.memo-method-grid span,
.memo-story-grid span,
.memo-swim-grid p,
.memo-faq-grid p {
    color: var(--memo-muted);
    font-size: 14px;
    line-height: 1.5;
    font-weight: 650;
}

.memo-steps-grid ol {
    margin: 0;
    padding-left: 1.15rem;
    color: var(--memo-muted);
    font-size: 14px;
    line-height: 1.5;
    font-weight: 650;
}

.memo-steps-grid a,
.memo-faq-grid a {
    color: var(--memo-deep);
    font-weight: 800;
}

.memo-tool-section {
    background:
        linear-gradient(160deg, rgba(7, 86, 83, 0.98) 0%, rgba(20, 95, 70, 0.96) 55%, rgba(47, 107, 63, 0.94) 100%);
    color: #fffdf0;
}

.memo-tool-panel {
    display: grid;
    gap: 16px;
}

.memo-tool-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.memo-tool-tabs button {
    min-width: 0;
    min-height: 54px;
    padding: 10px 8px;
    border: 3px solid rgba(24, 58, 54, 0.9);
    border-radius: 12px;
    background: rgba(255, 253, 240, 0.12);
    color: #fffdf0;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 3px 3px 0 rgba(3, 48, 47, 0.2);
}

.memo-tool-tabs button small {
    display: block;
    margin-top: 2px;
    color: rgba(255, 253, 240, 0.78);
    font-size: 12px;
    font-weight: 700;
}

.memo-tool-tabs button.is-active {
    color: var(--memo-deep-dark);
    background: linear-gradient(180deg, #ffe584 0%, #e5b447 100%);
}

.memo-tool-tabs button.is-active small {
    color: rgba(4, 63, 62, 0.78);
}

.memo-tool-controls {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr) minmax(0, 0.9fr) auto;
    gap: 12px;
    align-items: end;
    padding: 14px;
    border: 3px solid rgba(24, 58, 54, 0.55);
    border-radius: 14px;
    background: rgba(4, 63, 62, 0.28);
}

.memo-field {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.memo-field span {
    color: rgba(255, 253, 240, 0.86);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.memo-field input,
.memo-field select {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 3px solid var(--memo-line);
    border-radius: 10px;
    background: #fffdf1;
    color: var(--memo-ink);
    font-weight: 700;
}

.memo-field.is-disabled {
    opacity: 0.55;
}

.memo-tool-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.memo-tool-actions .memo-secondary-btn,
.memo-tool-actions .memo-ghost-btn {
    min-height: 44px;
    box-shadow: 3px 3px 0 rgba(3, 48, 47, 0.18);
}

.memo-progress {
    display: grid;
    gap: 10px;
    padding: 14px 16px;
    border: 3px solid rgba(24, 58, 54, 0.45);
    border-radius: 14px;
    background: rgba(255, 253, 240, 0.1);
}

.memo-progress-copy {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    align-items: baseline;
}

.memo-progress-copy p {
    margin: 0;
    color: rgba(255, 253, 240, 0.88);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.memo-progress-copy strong {
    color: #ffe584;
    font-size: 22px;
    font-weight: 900;
}

.memo-progress-track {
    height: 12px;
    overflow: hidden;
    border: 2px solid rgba(24, 58, 54, 0.55);
    border-radius: 999px;
    background: rgba(4, 63, 62, 0.45);
}

.memo-progress-track span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #8fd46a 0%, #ffe584 100%);
    transition: width 160ms ease;
}

.memo-progress-how {
    margin: 0;
    color: rgba(255, 253, 240, 0.9);
    font-size: 14px;
    line-height: 1.5;
    font-weight: 650;
}

.memo-tool-body {
    padding: 14px;
    border: 3px solid rgba(24, 58, 54, 0.45);
    border-radius: 14px;
    background: rgba(255, 253, 241, 0.96);
    color: var(--memo-ink);
}

.memo-loading,
.memo-empty {
    margin: 0;
    padding: 18px 8px;
    color: var(--memo-muted);
    font-size: 15px;
    font-weight: 700;
    text-align: center;
}

.memo-entry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 10px;
}

.memo-entry {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    min-width: 0;
    padding: 12px;
    border: 3px solid var(--memo-line);
    border-radius: 12px;
    background: #fffdf8;
    cursor: pointer;
    transition: background 120ms ease, transform 120ms ease;
}

.memo-entry:hover {
    transform: translateY(-1px);
    background: #f4fbea;
}

.memo-entry.is-checked {
    background: linear-gradient(180deg, #e8f7dc 0%, #d8efc8 100%);
}

.memo-entry input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: #2f6b3f;
    cursor: pointer;
}

.memo-entry-body {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.memo-entry-title {
    color: var(--memo-deep-dark);
    font-size: 15px;
    font-weight: 900;
    line-height: 1.25;
}

.memo-entry-rom,
.memo-entry-meta {
    color: var(--memo-muted);
    font-size: 12px;
    line-height: 1.35;
    font-weight: 700;
}

.memo-entry-link {
    justify-self: start;
    margin-top: 2px;
    color: var(--memo-deep);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.memo-entry-link:hover {
    text-decoration: underline;
}

.memo-gear-table-wrap {
    overflow-x: auto;
    border: 3px solid var(--memo-line);
    border-radius: 12px;
    background: #fff;
}

.memo-gear-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 520px;
}

.memo-gear-table th,
.memo-gear-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #d7e2c8;
    text-align: left;
    vertical-align: top;
    font-size: 14px;
    line-height: 1.4;
}

.memo-gear-table th {
    background: #1f6b5a;
    color: #fffdf0;
    font-weight: 800;
}

.memo-gear-table td {
    color: var(--memo-ink);
    font-weight: 650;
    background: #fffdf8;
}

.memo-gear-table tr:nth-child(even) td {
    background: #f4f8ec;
}

.memo-gear-table tr:last-child td {
    border-bottom: none;
}

.memo-next-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.memo-next-links a {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 16px;
    border: 4px solid var(--memo-line);
    border-radius: 14px;
    background: linear-gradient(180deg, #fffdf1 0%, #eef7e4 100%);
    color: inherit;
    text-decoration: none;
    box-shadow: 6px 6px 0 rgba(3, 48, 47, 0.12);
}

.memo-next-links span {
    color: #2f6b3f;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.memo-next-links strong {
    color: var(--memo-deep-dark);
    font-size: 18px;
    line-height: 1.25;
}

.memo-toc,
.memo-game-shot,
.memo-side-tip {
    padding: 16px;
    border: 4px solid var(--memo-line);
    border-radius: 12px;
    background: var(--memo-paper);
    box-shadow: 6px 6px 0 rgba(3, 48, 47, 0.14);
}

.memo-toc {
    display: grid;
    gap: 6px;
}

.memo-toc > p,
.memo-side-tip p {
    margin: 0;
}

.memo-toc > p {
    color: #2f6b3f;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.memo-toc a {
    color: var(--memo-deep);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    padding: 6px 0;
    border-bottom: 1px dashed #c9d8b8;
}

.memo-toc a:last-child {
    border-bottom: none;
}

.memo-toc a:hover {
    color: #0a6f4f;
}

.memo-game-shot {
    margin: 0;
}

.memo-game-shot img {
    display: block;
    width: 100%;
    height: auto;
    border: 2px solid var(--memo-line);
    border-radius: 6px;
    image-rendering: pixelated;
    background: #0a3d45;
}

.memo-game-shot figcaption {
    margin-top: 10px;
    color: var(--memo-muted);
    font-size: 12px;
    line-height: 1.45;
    font-weight: 700;
}

.memo-side-tip {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    background: #fff6df;
}

.memo-side-tip-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid var(--memo-line);
    background: radial-gradient(circle at 35% 30%, #fff 0 18%, #8fd46a 19% 100%);
}

.memo-side-tip p {
    color: var(--memo-ink);
    font-size: 13px;
    line-height: 1.45;
    font-weight: 700;
}

@media (max-width: 980px) {
    .memo-hero-inner,
    .memo-page-layout {
        grid-template-columns: 1fr;
    }

    .memo-side-column {
        position: static;
        order: -1;
    }

    .memo-tool-controls {
        grid-template-columns: 1fr 1fr;
    }

    .memo-tool-actions {
        grid-column: 1 / -1;
    }

    .memo-method-grid,
    .memo-story-grid,
    .memo-swim-grid,
    .memo-steps-grid,
    .memo-faq-grid,
    .memo-next-links {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .memo-hero-stats,
    .memo-tool-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .memo-tool-controls {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .memo-hero-inner,
    .memo-page-layout {
        width: min(calc(100% - 24px), 1220px);
        padding-left: 0;
        padding-right: 0;
    }

    .memo-hero-inner {
        padding-top: 36px;
        padding-bottom: 40px;
        gap: 24px;
    }

    .memo-section {
        padding: 18px;
    }

    .memo-hero h1 {
        font-size: clamp(30px, 9vw, 42px);
    }

    .memo-lead {
        font-size: 16px;
    }

    .memo-entry-grid {
        grid-template-columns: 1fr;
    }

    .memo-gear-table th,
    .memo-gear-table td {
        padding: 10px;
        font-size: 13px;
    }
}
