:root {
    --primary: #2463eb;
    --primary-hover: #1e4fd6;
    --primary-light: #dbe7ff;
    --primary-soft: #eef4ff;
    --accent: #0f8a7b;
    --accent-soft: #e0f7f3;

    --positive: #16803c;
    --positive-soft: #e7f8ee;
    --negative: #d92d45;
    --negative-soft: #fde8ec;
    --warning: #b7791f;
    --warning-soft: #fff5d6;

    --background: #f6f8fb;
    --surface: #ffffff;
    --surface-muted: #f8fafc;
    --surface-strong: #edf2f7;
    --text-main: #101828;
    --text-sub: #667085;
    --text-muted: #98a2b3;
    --border: #e4e8ef;
    --border-strong: #cdd5df;
    --border-color: var(--border);

    --input-bg: #ffffff;
    --radius: 8px;
    --radius-lg: 8px;
    --header-height: 56px;
    --header-bg: rgba(255, 255, 255, 0.92);
    --header-border: rgba(16, 24, 40, 0.08);

    --space-card: 1rem;
    --space-section: 1rem;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04), 0 6px 18px rgba(16, 24, 40, 0.035);
    --shadow-md: 0 10px 24px rgba(16, 24, 40, 0.075);
    --shadow-lg: 0 24px 56px rgba(16, 24, 40, 0.16);
    --focus-ring: 0 0 0 3px rgba(36, 99, 235, 0.14);
}

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}

article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
    display: block;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
}

body {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    background: linear-gradient(180deg, #fbfcfe 0%, var(--background) 54%, #f1f5f9 100%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    letter-spacing: 0;
    -webkit-font-smoothing: antialiased;
}

ol, ul {
    list-style: none;
}

blockquote, q {
    quotes: none;
}

blockquote:before, blockquote:after,
q:before, q:after {
    content: '';
    content: none;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

button,
input,
textarea,
select {
    font: inherit;
    letter-spacing: 0;
}

button {
    color: inherit;
}

a {
    color: inherit;
}

strong {
    font-weight: 700;
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.92em;
}

.visually-hidden {
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

.app-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.25rem;
    flex: 1;
}

body > main {
    flex: 1 0 auto;
}

.page {
    display: grid;
    gap: var(--space-section);
    align-content: start;
}

.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.page-head > div {
    min-width: 0;
}

.page-head .page-title {
    min-width: 0;
    overflow-wrap: anywhere;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

.btn {
    min-height: 38px;
    padding: 0.5rem 0.85rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    background: transparent;
    color: inherit;
    font-size: 0.88rem;
    font-weight: 760;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:disabled,
.btn[aria-disabled="true"] {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    font-weight: 850;
    box-shadow: 0 8px 18px rgba(36, 99, 235, 0.18);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-danger {
    background-color: var(--negative);
    color: #ffffff;
    border-color: var(--negative);
    box-shadow: 0 8px 18px rgba(217, 45, 69, 0.16);
}

.btn-danger:hover {
    background-color: #b91c1c;
    border-color: #b91c1c;
}

.btn-secondary {
    background-color: var(--surface);
    color: var(--text-main);
    border-color: var(--border);
    box-shadow: none;
}

.btn-secondary:hover {
    background-color: var(--surface-muted);
    border-color: var(--border-strong);
}

.btn.active,
.btn-secondary.active {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary);
}

.btn-tertiary {
    border-color: transparent;
    background: transparent;
    color: var(--text-sub);
    box-shadow: none;
}

.btn-tertiary:hover {
    background: var(--surface-muted);
    color: var(--text-main);
    transform: none;
}

.card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--space-card);
}

.styled-input {
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: var(--input-bg);
    padding: 0.48rem 0.7rem;
    color: var(--text-main);
    font-size: 0.94rem;
    font-weight: 500;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.styled-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--focus-ring);
}

.styled-input::placeholder,
textarea::placeholder,
input::placeholder {
    color: var(--text-muted);
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    color: var(--text-main);
    font-weight: 800;
    letter-spacing: 0;
}

.page-title {
    font-size: clamp(1.35rem, 2vw, 1.65rem);
    font-weight: 800;
    line-height: 1.25;
}

.text-positive {
    color: var(--positive) !important;
}

.text-negative {
    color: var(--negative) !important;
}

.site-footer {
    width: 100%;
    margin-top: 0;
    padding: 1.6rem 0 1.5rem;
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.92);
    color: var(--text-sub);
    font-size: 0.8rem;
    flex-shrink: 0;
}

.footer-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
    display: grid;
    grid-template-columns: minmax(150px, 0.62fr) minmax(0, 2fr);
    align-items: start;
    gap: 1.75rem;
}

.footer-brand-block {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.35rem;
}

.footer-brand {
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 900;
    text-decoration: none;
}

.footer-meta {
    margin: 0;
    line-height: 1.4;
}

.footer-sections {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
}

.footer-section {
    min-width: 0;
}

.footer-heading {
    margin: 0 0 0.55rem;
    color: var(--text-main);
    font-size: 0.78rem;
    font-weight: 850;
    line-height: 1.3;
}

.footer-list {
    display: grid;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-link,
.footer-feed-link {
    color: var(--text-sub);
    line-height: 1.45;
    text-decoration: none;
    font-weight: 650;
    overflow-wrap: anywhere;
    transition: color 0.16s ease;
}

.footer-link:hover,
.footer-feed-link:hover {
    color: var(--primary);
}

.footer-feed-link,
.footer-feedback-button {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    align-items: center;
    gap: 0.4rem;
}

.footer-feedback-button {
    min-height: 32px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface-muted);
    color: var(--text-main);
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    padding: 0.35rem 0.55rem;
    transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
}

.footer-feedback-button:hover,
.footer-feedback-button:focus-visible {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary);
    outline: none;
}

.footer-action-icon {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.primary-link {
    color: var(--primary);
    font-weight: 800;
    text-decoration: none;
}

.primary-link:hover {
    text-decoration: underline;
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(4px);
}

.modal-content {
    width: min(100%, 420px);
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    padding: 1.25rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.modal-text {
    margin: 0.65rem 0 1rem;
    color: var(--text-sub);
    font-size: 0.92rem;
    line-height: 1.6;
}

.feedback-modal {
    overflow: auto;
}

.feedback-modal-content {
    width: min(92vw, 460px);
    padding: 1.25rem;
}

.feedback-modal-title {
    margin-bottom: 0.5rem;
    font-size: 1.08rem;
    font-weight: 800;
}

.feedback-modal-description {
    margin-bottom: 0.4rem;
    color: var(--text-sub);
    font-size: 0.9rem;
    line-height: 1.5;
}

.feedback-modal-warning {
    margin-bottom: 0.85rem;
    color: var(--negative);
    font-size: 0.84rem;
    font-weight: 700;
}

.feedback-modal-field {
    display: grid;
    gap: 0.35rem;
    margin-bottom: 0.7rem;
    color: var(--text-main);
    font-size: 0.84rem;
    font-weight: 800;
}

.feedback-modal-field span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.feedback-modal-field em {
    color: var(--text-sub);
    font-style: normal;
    font-size: 0.76rem;
    font-weight: 650;
}

.feedback-modal-field select,
.feedback-modal-field input {
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text-main);
    padding: 0.48rem 0.65rem;
    font-size: 0.9rem;
}

.feedback-modal-field select:focus,
.feedback-modal-field input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--focus-ring);
}

.feedback-modal-textarea {
    width: 100%;
    min-height: 120px;
    margin-bottom: 0.85rem;
    padding: 0.7rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    resize: vertical;
    color: var(--text-main);
    background: var(--surface);
}

.feedback-modal-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.feedback-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.feedback-modal-btn {
    min-height: 34px;
    padding: 0.42rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
}

.feedback-modal-btn-secondary {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-main);
}

.feedback-modal-btn-primary {
    border: 1px solid var(--primary);
    background: var(--primary);
    color: #ffffff;
}

.site-header {
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--header-border);
    background-color: var(--header-bg);
    box-shadow: 0 1px 0 rgba(16, 24, 40, 0.02);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.header-content {
    width: 100%;
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.header-left {
    min-width: 0;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 1.4rem;
}

.brand {
    height: 100%;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 800;
    line-height: 1;
}

.brand:hover {
    color: var(--primary);
}

.brand-icon,
.brand-icon img {
    display: block;
}

.brand-icon img {
    width: 28px;
    height: 28px;
    border-radius: 7px;
}

.brand-word {
    font-size: 1rem;
    letter-spacing: 0;
}

.desktop-nav {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-link {
    height: 100%;
    display: inline-flex;
    align-items: center;
    border-bottom: 2px solid transparent;
    color: var(--text-sub);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.16s ease, border-color 0.16s ease;
}

.nav-link:hover {
    color: var(--text-main);
    border-color: var(--primary);
}

.nav-link:focus-visible,
.nav-more-menu a:focus-visible,
.mobile-nav-link:focus-visible,
.mobile-nav-more-menu a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

.nav-more {
    height: 100%;
    position: relative;
}

.nav-more > summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.nav-more > summary::-webkit-details-marker,
.mobile-nav-more > summary::-webkit-details-marker {
    display: none;
}

.nav-more-trigger::after {
    content: '';
    width: 6px;
    height: 6px;
    margin-left: 0.42rem;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.16s ease;
}

.nav-more[open] > .nav-more-trigger {
    color: var(--text-main);
    border-color: var(--primary);
}

.nav-more[open] > .nav-more-trigger::after {
    transform: translateY(2px) rotate(225deg);
}

.nav-more-menu {
    width: 270px;
    position: absolute;
    z-index: 110;
    top: calc(100% - 1px);
    left: -0.8rem;
    display: grid;
    gap: 0.25rem;
    padding: 0.45rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
}

.nav-more-menu a {
    display: grid;
    gap: 0.18rem;
    padding: 0.72rem;
    border-radius: 7px;
    color: var(--text-main);
    text-decoration: none;
}

.nav-more-menu a:hover {
    background: var(--surface-muted);
}

.nav-more-menu strong {
    font-size: 0.86rem;
    font-weight: 800;
}

.nav-more-menu span {
    color: var(--text-sub);
    font-size: 0.74rem;
    line-height: 1.4;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-auth-form {
    display: inline-flex;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-main);
    font-size: 0.86rem;
}

.greeting {
    color: var(--text-sub);
    font-weight: 500;
}

.profile-link {
    color: var(--text-main);
    font-weight: 800;
    text-decoration: none;
}

.profile-link:hover {
    color: var(--primary);
}

.btn-auth {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.7rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.btn-auth.btn-login {
    background-color: var(--text-main);
    color: #ffffff;
}

.btn-auth.btn-login:hover {
    background-color: #020617;
}

.btn-auth.btn-logout {
    background-color: var(--surface-muted);
    color: var(--text-sub);
    border-color: var(--border);
}

.btn-auth.btn-logout:hover {
    color: var(--text-main);
    border-color: var(--border-strong);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    cursor: pointer;
    z-index: 101;
}

.mobile-menu-btn span {
    display: block;
    width: 16px;
    height: 2px;
    margin: 0 auto;
    border-radius: 999px;
    background-color: var(--text-main);
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background-color: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.22s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

.mobile-menu-wrapper {
    position: absolute;
    top: 0;
    right: -300px;
    width: min(300px, 86vw);
    height: 100%;
    z-index: 10000;
    border-left: 1px solid var(--border);
    background-color: var(--surface);
    box-shadow: -12px 0 32px rgba(15, 23, 42, 0.12);
    transition: right 0.22s ease;
}

.mobile-menu-overlay.active .mobile-menu-wrapper {
    right: 0;
}

.mobile-menu-content {
    width: 100%;
    height: 100%;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.close-menu-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text-sub);
    cursor: pointer;
}

.close-menu-btn:hover {
    color: var(--text-main);
}

.mobile-user-info {
    margin-bottom: 1rem;
    padding: 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: var(--surface-muted);
}

.user-profile-mobile {
    margin-bottom: 0.6rem;
    color: var(--text-main);
    font-size: 0.92rem;
}

.mobile-nickname {
    font-weight: 800;
}

.btn-mobile-profile {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text-sub);
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 0.55rem 0.1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
    font-size: 0.98rem;
    font-weight: 700;
    text-decoration: none;
}

.mobile-nav-link:hover {
    color: var(--primary);
}

.mobile-nav-more > summary {
    justify-content: space-between;
    list-style: none;
    cursor: pointer;
}

.mobile-nav-more > summary::after {
    content: '';
    width: 7px;
    height: 7px;
    margin-right: 0.25rem;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.16s ease;
}

.mobile-nav-more[open] > summary::after {
    transform: translateY(2px) rotate(225deg);
}

.mobile-nav-more-menu {
    display: grid;
    gap: 0.3rem;
    padding: 0.35rem 0 0.7rem 0.8rem;
    border-bottom: 1px solid var(--border);
}

.mobile-nav-more-menu a {
    display: grid;
    gap: 0.16rem;
    padding: 0.58rem 0.65rem;
    border-radius: var(--radius);
    color: var(--text-main);
    text-decoration: none;
}

.mobile-nav-more-menu a:hover {
    background: var(--surface-muted);
}

.mobile-nav-more-menu strong {
    font-size: 0.9rem;
    font-weight: 800;
}

.mobile-nav-more-menu span {
    color: var(--text-sub);
    font-size: 0.76rem;
    line-height: 1.4;
}

.mobile-auth-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btn-mobile-auth {
    width: 100%;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: var(--radius);
    text-align: center;
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
}

.btn-mobile-auth.btn-login {
    background-color: var(--text-main);
    color: #ffffff;
}

.btn-mobile-auth.btn-logout {
    background-color: var(--surface-muted);
    color: var(--text-main);
    border-color: var(--border);
}

.tooltip-container {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.tooltip-text {
    display: none;
    width: 220px;
    position: absolute;
    z-index: 20;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 0.55rem 0.65rem;
    border-radius: var(--radius);
    background-color: #0f172a;
    color: #ffffff;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.45;
    opacity: 0;
    pointer-events: none;
    box-shadow: var(--shadow-md);
    transition: opacity 0.16s ease;
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #0f172a transparent transparent transparent;
}

.help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background-color: var(--surface-muted);
    color: var(--text-sub);
    font-size: 0.75rem;
    font-weight: 800;
    cursor: help;
}

.tooltip-inline {
    margin-left: 0.45rem;
}

.help-tooltip {
    display: none;
    width: min(320px, 84vw);
    position: absolute;
    z-index: 30;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: var(--surface);
    color: var(--text-main);
    text-align: left;
    font-size: 0.85rem;
    line-height: 1.55;
    white-space: normal;
    opacity: 0;
    pointer-events: none;
    box-shadow: var(--shadow-lg);
    transition: opacity 0.16s ease;
}

.help-tooltip::after {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 7px;
    border-style: solid;
    border-color: transparent transparent var(--surface) transparent;
}

.tooltip-container:hover .tooltip-text,
.tooltip-container:hover .help-tooltip,
.tooltip-container:focus-within .tooltip-text,
.tooltip-container:focus-within .help-tooltip {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

.help-tooltip ol {
    padding-left: 1.1rem;
    margin: 0.5rem 0 0;
}

.help-tooltip li {
    margin-bottom: 0.25rem;
}

.portfolio-modal {
    display: none;
    animation: portfolioModalFadeIn 0.16s ease-out;
}

.portfolio-modal .modal-content {
    width: min(100%, 420px);
    padding: 1.25rem;
    text-align: left;
    animation: portfolioModalSlideUp 0.18s ease-out;
}

.portfolio-modal h3 {
    margin: 0 0 1rem;
    color: var(--text-main);
    font-size: 1.16rem;
    font-weight: 800;
}

.portfolio-modal .modal-actions {
    margin-top: 1rem;
}

.portfolio-modal .modal-actions .btn {
    min-width: 0;
}

@keyframes portfolioModalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes portfolioModalSlideUp {
    from {
        transform: translateY(10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 900px) {
    .desktop-nav,
    .desktop-user-menu {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    .btn,
    .btn-auth,
    .btn-mobile-auth,
    .btn-mobile-profile,
    .feedback-modal-btn,
    .footer-feedback-button {
        min-height: 44px;
    }

    .mobile-menu-btn,
    .close-menu-btn {
        width: 44px;
        height: 44px;
    }

    .mobile-nav-link {
        min-height: 48px;
    }

    .app-container {
        padding: 1rem;
    }

    .page-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .header-content {
        padding: 0 1rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 1.2rem;
        padding: 0 1rem;
    }

    .footer-sections {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem 1.25rem;
    }

    .modal-actions,
    .feedback-modal-actions {
        flex-wrap: wrap;
    }

    .modal-actions .btn,
    .feedback-modal-btn {
        flex: 1 1 120px;
    }
}
