#currencyConverter {
    margin: 12px 0 16px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f8f9fa;
}

.currency-input {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0 10px;
}

.currency-input label {
    font-weight: 700;
    width: 40px;
}

.currency-input input {
    flex: 1;
    min-width: 0;
    padding: 7px;
    border: 1px solid #bbb;
    border-radius: 6px;
    font-size: 16px;
}

.currency-result {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    font-size: 14px;
}

.currency-result strong {
    font-variant-numeric: tabular-nums;
}

#currencyStatus {
    margin-top: 6px;
    font-size: 11px;
    color: #777;
}
html, body {
    margin: 0;
    padding: 0;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    background: #f5f5f5;
    color: #222;
}

body {
    min-height: 100vh;
}

header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 54px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border-bottom: 1px solid #ddd;
    box-sizing: border-box;
    flex-shrink: 0;
}

.header-brand {
    display: flex;
    align-items: center;
    min-width: 0;
}

.header-note {
    max-width: 430px;
    margin-left: 18px;
    padding-left: 18px;
    border-left: 1px solid #ddd;
    color: #666;
    font-size: 11px;
    line-height: 1.25;
}

.title {
    font-size: 18px;
    font-weight: 600;
}

.subtitle {
    font-size: 13px;
    color: #666;
    margin-left: 10px;
}

nav {
    display: flex;
    gap: 6px;
    align-items: center;
}

nav a {
    color: #333;
    text-decoration: none;
    padding: 7px 10px;
    border-radius: 6px;
}

nav a:hover {
    background: #eee;
}

nav a.active {
    background: #e8e8e8;
    font-weight: 600;
}

nav a.logout {
    color: #777;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown summary {
    color: #333;
    padding: 7px 10px;
    border-radius: 6px;
    cursor: pointer;
    list-style: none;
    white-space: nowrap;
}

.nav-dropdown summary::-webkit-details-marker {
    display: none;
}

.nav-dropdown summary::after {
    content: "\25BE";
    display: inline-block;
    margin-left: 6px;
    font-size: 11px;
}

.nav-dropdown summary:hover,
.nav-dropdown[open] summary {
    background: #eee;
}

.nav-dropdown summary.active {
    background: #e8e8e8;
    font-weight: 600;
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 230px;
    padding: 6px;
    background: #fff;
    border: 1px solid #d8d8d8;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
    z-index: 1200;
    max-height: calc(100dvh - 80px);
    overflow-y: auto;
}

.nav-dropdown-menu a {
    display: block;
    padding: 9px 11px;
    white-space: nowrap;
}

.nav-submenu summary {
    padding: 9px 11px;
    color: #333;
    cursor: pointer;
    list-style: none;
    white-space: nowrap;
}

.nav-submenu summary::-webkit-details-marker {
    display: none;
}

.nav-submenu summary::after {
    content: "\25B8";
    float: right;
    margin-left: 12px;
}

.nav-submenu[open] summary::after {
    content: "\25BE";
}

.nav-submenu summary:hover,
.nav-submenu[open] > summary {
    background: #eee;
    border-radius: 6px;
}

.nav-submenu-menu a {
    padding-left: 24px;
    font-size: 13px;
}

.practical-modal-backdrop {
    position: fixed;
    inset: 54px 0 0;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, .38);
    box-sizing: border-box;
}

.practical-modal {
    display: flex;
    flex-direction: column;
    width: min(840px, 100%);
    height: min(720px, calc(100dvh - 86px));
    max-height: calc(100dvh - 86px);
    overflow: hidden;
    background: #fff;
    border: 1px solid #bbb;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .35);
}

.practical-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex: 0 0 auto;
    padding: 16px 18px;
    border-bottom: 1px solid #ddd;
    background: #fff;
}

.practical-modal-header h2 {
    margin: 0;
    font-size: 21px;
}

.practical-modal-close {
    flex: 0 0 auto;
    color: #222;
    text-decoration: none;
    padding: 7px 11px;
    border: 1px solid #bbb;
    border-radius: 6px;
    background: #fff;
}

.practical-modal-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
    touch-action: pan-y;
    padding: 18px;
}

.practical-modal-content > :first-child {
    margin-top: 0;
}

.transport-map-figure {
    margin: 0 0 16px;
}

.transport-map-image {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.transport-map-figure figcaption {
    margin-top: 6px;
    color: #666;
    font-size: 12px;
}

.practical-video {
    display: block;
    width: 100%;
    max-width: 900px;
    border-radius: 8px;
}

.esim-options {
    list-style: none;
    margin: 0;
    padding: 0;
}

.esim-provider + .esim-provider {
    margin-top: 24px;
}

.esim-provider h3 {
    margin: 0 0 10px;
    font-size: 19px;
}

.esim-options li {
    margin: 0 0 12px;
}

.esim-options a {
    display: block;
    padding: 14px 16px;
    color: #222;
    text-decoration: none;
    border: 1px solid #d5d5d5;
    border-radius: 8px;
    background: #fafafa;
}

.esim-options a:hover,
.esim-options a:focus-visible {
    border-color: #1683c6;
    background: #f2f8fc;
}

.esim-options strong,
.esim-options span {
    display: block;
}

.esim-options strong {
    color: #0674c4;
    margin-bottom: 4px;
}

.esim-options span {
    color: #555;
}

main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 25px 18px 50px;
    box-sizing: border-box;
}

h1 {
    margin-top: 0;
}

.intro {
    color: #666;
    margin-bottom: 25px;
}

.planner-tagline {
    margin: -4px 0 8px;
    color: #666;
    font-size: 15px;
    font-style: italic;
}

.day {
    background: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    margin-bottom: 14px;
    padding: 18px 20px;
}

.day-number {
    font-size: 13px;
    color: #777;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.day h2 {
    margin: 4px 0 8px;
    font-size: 20px;
}

.day .area {
    color: #666;
    margin-bottom: 12px;
}

.day ul {
    margin: 8px 0 0 20px;
    padding: 0;
}

.day li {
    margin-bottom: 7px;
}

.itinerary-event {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 5px 2px 2px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #1769aa;
    font: inherit;
    cursor: pointer;
    vertical-align: middle;
}

.itinerary-event:hover,
.itinerary-event:focus-visible {
    background: #e8f2f8;
    outline: none;
}

.itinerary-event-number {
    display: inline-flex;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    border: 2px solid #333;
    border-radius: 50%;
    background: white;
    color: #222;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    box-sizing: border-box;
}

.itinerary-place-info-panel {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(840px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    padding: 18px;
    overflow: hidden;
    box-sizing: border-box;
    border: 1px solid #bbb;
    border-radius: 10px;
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .35);
    z-index: 2100;
}

.itinerary-place-info-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.itinerary-place-info-header h2 {
    margin: 0;
    font-size: 20px;
}

.itinerary-place-info-header .control {
    padding: 7px 10px;
    border: 1px solid #bbb;
    border-radius: 6px;
    background: white;
    cursor: pointer;
}

.itinerary-place-info-content {
    max-height: calc(100dvh - 120px);
    overflow: auto;
    padding-right: 8px;
    line-height: 1.6;
    overscroll-behavior: contain;
}

.itinerary-place-info-content::after {
    display: block;
    clear: both;
    content: "";
}

.itinerary-place-info-content h3 {
    margin: 16px 0 6px;
}

.itinerary-place-info-content p {
    margin: 0 0 12px;
}

.itinerary-place-info-figure {
    float: left;
    width: clamp(220px, 40%, 320px);
    margin: 4px 24px 14px 0;
}

.itinerary-place-info-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.itinerary-place-info-caption {
    margin-top: 7px;
    color: #666;
    font-size: 12px;
    line-height: 1.35;
}

.itinerary-place-info-details {
    margin: 12px 0 18px;
}

.itinerary-place-info-details dt {
    float: left;
    clear: left;
    margin-right: 6px;
    font-weight: 700;
}

.itinerary-place-info-details dd {
    margin: 0 0 8px;
}

.itinerary-place-info-link {
    color: #0674c4;
    text-decoration: underline;
}

.itinerary-place-info-clear {
    clear: both;
}

.itinerary-place-info-warning {
    clear: both;
    color: red;
    font-weight: 700;
    text-align: center;
}

.note {
    margin-top: 12px;
    padding: 10px 12px;
    background: #f7f7f7;
    border-radius: 6px;
    color: #555;
}

.place {
    background: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    margin-bottom: 14px;
    padding: 18px 20px;
}

.place h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

.place p {
    line-height: 1.55;
    margin: 8px 0;
}

.category {
    font-size: 13px;
    color: #777;
    margin-bottom: 8px;
}

.tip {
    background: #f7f7f7;
    padding: 10px 12px;
    border-radius: 6px;
    margin-top: 12px;
}

.section {
    background: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    margin-bottom: 16px;
    padding: 20px;
}

.section h2 {
    margin-top: 0;
    font-size: 21px;
}

.section h3 {
    margin-bottom: 8px;
}

ul {
    line-height: 1.6;
}

li {
    margin-bottom: 6px;
}

.warning {
    background: #fff8e6;
    border-radius: 6px;
    padding: 12px;
    margin-top: 12px;
}

.checklist {
    list-style: none;
    padding-left: 0;
}

.checklist li {
    margin: 10px 0;
}

.checklist-group + .checklist-group {
    margin-top: 22px;
}

.checklist-group h3 {
    margin: 0 0 8px;
}

.checklist li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.checklist li::before {
    content: "\2610";
    flex: 0 0 auto;
    font-size: 20px;
    line-height: 1.2;
    color: #555;
}

/* Map page */

.map-page {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

#mapframe {
    width: 100%;
    flex: 1;
    border: 0;
    min-height: 0;
}

@media (max-width: 700px) {

    .title {
        font-size: 16px;
    }

    .subtitle {
        display: none;
    }

    .header-note {
        display: none;
    }

    nav a {
        font-size: 13px;
        padding: 6px 7px;
    }

    .nav-dropdown summary {
        font-size: 13px;
        padding: 6px 7px;
    }

    .nav-dropdown-menu {
        width: min(230px, calc(100vw - 24px));
    }

    .practical-modal-backdrop {
        padding: 10px;
    }

    .practical-modal {
        height: calc(100dvh - 74px);
        max-height: calc(100dvh - 74px);
    }

    .practical-modal-header {
        padding: 12px 14px;
    }

    .practical-modal-content {
        padding: 14px;
    }

    main {
        padding: 18px 12px 40px;
    }

    .day {
        padding: 15px;
    }

    .place {
        padding: 15px;
    }

    .section {
        padding: 15px;
    }

    .itinerary-place-info-panel {
        width: calc(100vw - 20px);
        max-height: calc(100dvh - 20px);
        padding: 14px;
    }

    .itinerary-place-info-content {
        max-height: calc(100dvh - 100px);
    }

    .itinerary-place-info-figure {
        float: none;
        width: min(100%, 360px);
        margin: 0 auto 18px;
    }
}

@media (max-width: 1180px) {

    .header-note {
        max-width: 280px;
        font-size: 10px;
    }
}

@media (max-width: 980px) {

    .header-note {
        display: none;
    }
}
#refresh-currency {
    padding: 9px 14px;
    border: 1px solid #ccc;
    border-radius: 7px;
    background: white;
    color: #333;
    font-size: 14px;
    cursor: pointer;
}

.currency-rate-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 18px;
    margin-bottom: 8px;
}

.currency-rate-grid p,
.currency-rate-meta {
    margin: 0;
}

.currency-rate-meta {
    margin-bottom: 10px;
}

#refresh-currency:hover {
    background: #f2f2f2;
}

#refresh-currency:disabled {
    opacity: 0.6;
    cursor: default;
}

.passkey-guide-image {
    display: block;
    width: 100%;
    max-height: 260px;
    object-fit: contain;
    margin: 0 auto 16px;
    border-radius: 8px;
}

.passkey-steps {
    padding-left: 24px;
}

.passkey-steps li {
    margin-bottom: 8px;
}

.practical-callout {
    padding: 12px 14px;
    background: #f3f7fb;
    border-left: 4px solid #2878b5;
    border-radius: 5px;
}

.practical-primary-link {
    display: inline-block;
    padding: 10px 14px;
    color: #fff;
    background: #1769aa;
    border-radius: 6px;
    text-decoration: none;
}

.practical-primary-link:hover {
    background: #12588f;
}

.phrase-list {
    overflow: hidden;
    margin: 14px 0 20px;
    border: 1px solid #d8d8d8;
    border-radius: 8px;
}

.phrase-header,
.phrase-row {
    display: grid;
    grid-template-columns: minmax(150px, 1.05fr) minmax(140px, .9fr) minmax(210px, 1.35fr);
    gap: 12px;
    align-items: center;
}

.phrase-header {
    padding: 9px 12px;
    background: #f1f4f7;
    font-size: 13px;
    font-weight: 700;
}

.phrase-row {
    width: 100%;
    padding: 11px 12px;
    border: 0;
    border-top: 1px solid #e4e4e4;
    background: #fff;
    color: #222;
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.phrase-row:hover,
.phrase-row:focus-visible {
    background: #eef6fc;
    outline: none;
}

.phrase-turkish {
    color: #1269a5;
    font-weight: 700;
}

.phrase-pronunciation {
    color: #666;
    font-size: 13px;
}

.phrase-audio-status {
    min-height: 1.25em;
    color: #555;
    font-size: 13px;
}

.turkish-letters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 18px;
}

.turkish-letters div {
    display: grid;
    grid-template-columns: 30px 1fr;
    gap: 8px;
}

.turkish-letters dt {
    font-size: 20px;
    font-weight: 700;
}

.turkish-letters dd {
    margin: 0;
}

@media (max-width: 700px) {
    .phrase-header {
        display: none;
    }

    .phrase-row {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .phrase-english::before {
        content: "English: ";
        color: #777;
        font-size: 12px;
    }

    .phrase-pronunciation::before {
        content: "Say: ";
        color: #777;
        font-size: 12px;
    }

    .turkish-letters {
        grid-template-columns: 1fr;
    }
}

/* Application version */
.app-version {
    margin: 24px 0 12px;
    text-align: center;
    font-size: 11px;
    color: #888;
}
