:root {
    --nc-font-sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', system-ui, sans-serif;
    --nc-font-mono: 'SF Mono', Consolas, monaco, monospace;
    --nc-tx-1: #000000;
    --nc-tx-2: #1D1D1F;
    --nc-bg-1: #FFFFFF;
    --nc-bg-2: #F5F5F7;
    --nc-bg-3: #E8E8ED;
    --nc-lk-1: #0066CC;
    --nc-lk-2: #147CE5;
    --nc-lk-tx: #FFFFFF;
    --nc-ac-1: #06C167;
    --nc-ac-tx: #FFFFFF;
    --nc-space-1: clamp(0.5rem, 1.3vw, 0.75rem);
    --nc-space-2: clamp(0.75rem, 2vw, 1rem);
    --nc-space-3: clamp(1rem, 2.8vw, 1.5rem);
    --nc-space-4: clamp(1.25rem, 3.6vw, 2rem);
    --nc-radius-md: 12px;
    --nc-radius-lg: 18px;
    --z-header: 1200;
    --z-nav: 1200;
    --z-modal: 2000;
    --z-modal-ui: 2010;
    --modal-gutter: clamp(8px, 2.4vw, 16px);
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box
}

address,
area,
article,
aside,
audio,
blockquote,
datalist,
details,
dl,
fieldset,
figure,
form,
iframe,
meter,
ol,
optgroup,
option,
output,
p,
pre,
progress,
ruby,
section,
table,
textarea,
ul,
video {
    margin-bottom: 1rem
}

button,
html,
input,
select {
    font-family: var(--nc-font-sans)
}

html {
    min-height: 100%;
    background: #F5F5F7;
}

body {
    margin: 0;
    min-height: 100vh;
    max-width: none;
    padding: 0;
    border-radius: 0;
    overflow-x: hidden;
    word-break: normal;
    overflow-wrap: break-word;
    background: radial-gradient(120% 120% at 50% -10%, #FFFFFF 12%, #F9F9FB 58%, #F4F4F6 100%);
    color: var(--nc-tx-2);
    font-size: 17px;
    line-height: 1.47059;
    letter-spacing: -0.022em;
    font-family: var(--nc-font-sans);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.viewport-locked {
    touch-action: none;
}

.modal-overlay,
.modal-backdrop,
.overlay,
.dialog-overlay {
    z-index: var(--z-modal);
    padding: var(--modal-gutter);
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.modal-overlay > .modal-content,
.modal-backdrop > .modal-content,
.overlay > .modal,
.dialog-overlay > .dialog {
    width: min(100%, var(--modal-max, 1100px));
    max-height: calc(100vh - var(--modal-gutter) * 2);
    max-height: calc(100dvh - var(--modal-gutter) * 2);
}

@media (max-width: 480px) {
    .modal-overlay,
    .modal-backdrop,
    .overlay,
    .dialog-overlay {
        padding:
            max(8px, env(safe-area-inset-top))
            max(8px, env(safe-area-inset-right))
            max(8px, env(safe-area-inset-bottom))
            max(8px, env(safe-area-inset-left));
        align-items: stretch;
    }

    .modal-overlay > .modal-content,
    .modal-backdrop > .modal-content,
    .overlay > .modal,
    .dialog-overlay > .dialog {
        max-height: calc(100vh - max(8px, env(safe-area-inset-top)) - max(8px, env(safe-area-inset-bottom)));
        max-height: calc(100dvh - max(8px, env(safe-area-inset-top)) - max(8px, env(safe-area-inset-bottom)));
    }
}

::selection {
    background: var(--nc-ac-1);
    color: var(--nc-ac-tx)
}

h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.1;
    color: var(--nc-tx-1);
    padding-top: .875rem;
    font-weight: 600;
    letter-spacing: -0.022em;
}

h1,
h2,
h3 {
    color: var(--nc-tx-1);
    padding-bottom: 2px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--nc-bg-2)
}

h4,
h5,
h6 {
    margin-bottom: .3rem
}

h1 {
    font-size: 2.5rem
}

h2 {
    font-size: 2rem
}

h3 {
    font-size: 1.75rem
}

h4 {
    font-size: 1.5rem
}

h5 {
    font-size: 1.25rem
}

h6 {
    font-size: 1rem
}

a {
    color: var(--nc-lk-1);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--nc-lk-2)
}

abbr:hover {
    cursor: help
}

blockquote {
    padding: 1.5rem;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border-left: 5px solid var(--nc-bg-3);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 
                0 2px 4px -1px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
}

blockquote:hover {
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1),
                0 2px 4px -1px rgba(0,0,0,0.06);
}

abbr {
    cursor: help
}

blockquote :last-child {
    padding-bottom: 0;
    margin-bottom: 0
}

header {
    background: rgba(255,255,255,0.84);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--nc-radius-lg);
    padding: var(--nc-space-4) var(--nc-space-3);
    margin-bottom: var(--nc-space-4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px)
}

header h1,
header h2,
header h3 {
    padding-bottom: 0;
    border-bottom: 0
}

header>:first-child {
    margin-top: 0;
    padding-top: 0
}

header>:last-child {
    margin-bottom: 0
}

a button,
button,
input[type=button],
input[type=reset],
input[type=submit] {
    font-size: 17px;
    display: inline-block;
    padding: 12px 24px;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    background: var(--nc-lk-1);
    color: var(--nc-lk-tx);
    border: 0;
    border-radius: 12px;
    box-sizing: border-box;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(20px);
}

a button[disabled],
button[disabled],
input[type=button][disabled],
input[type=reset][disabled],
input[type=submit][disabled] {
    cursor: default;
    opacity: .5;
    cursor: not-allowed
}

.button:focus,
.button:hover,
button:focus,
button:hover,
input[type=button]:focus,
input[type=button]:hover,
input[type=reset]:focus,
input[type=reset]:hover,
input[type=submit]:focus,
input[type=submit]:hover {
    background: var(--nc-lk-2);
    transform: translateY(-1px);
}

code,
kbd,
pre,
samp {
    font-family: var(--nc-font-mono);
    font-size: 15px;
}

code,
kbd,
pre,
samp {
    background: var(--nc-bg-2);
    border: 1px solid var(--nc-bg-3);
    border-radius: 12px;
    padding: 3px 6px;
}

kbd {
    border-bottom: 3px solid var(--nc-bg-3)
}

pre {
    padding: 1.5rem;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 
                0 2px 4px -1px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    max-width: 100%;
    overflow: auto;
}

pre:hover {
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1),
                0 2px 4px -1px rgba(0,0,0,0.06);
}

pre code {
    background: inherit;
    font-size: inherit;
    color: inherit;
    border: 0;
    padding: 0;
    margin: 0
}

code pre {
    display: inline;
    background: inherit;
    font-size: inherit;
    color: inherit;
    border: 0;
    padding: 0;
    margin: 0
}

details {
    padding: 1.5rem;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--nc-bg-3);
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 
                0 2px 4px -1px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
}

details:hover {
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1),
                0 2px 4px -1px rgba(0,0,0,0.06);
}

summary {
    cursor: pointer;
    font-weight: 600
}

details[open] {
    padding-bottom: .75rem
}

details[open] summary {
    margin-bottom: 6px
}

details[open]>:last-child {
    margin-bottom: 0
}

dt {
    font-weight: 600
}

dd::before {
    content: '→ '
}

hr {
    border: 0;
    border-bottom: 1px solid var(--nc-bg-3);
    margin: 1rem auto
}

fieldset {
    margin-top: 1rem;
    padding: 2rem;
    border: 1px solid var(--nc-bg-3);
    border-radius: 12px
}

legend {
    padding: auto .5rem
}

table {
    border-collapse: collapse;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    width: auto;
    min-width: 100%;
}

td,
th {
    border: 1px solid var(--nc-bg-3);
    text-align: left;
    padding: 12px 16px;
    white-space: break-spaces;
}

th {
    background: var(--nc-bg-2);
    font-weight: 500;
}

tr:nth-child(even) {
    background: var(--nc-bg-2)
}

table caption {
    font-weight: 600;
    margin-bottom: .5rem
}

textarea {
    max-width: 100%
}

ol,
ul {
    padding-left: 2rem
}

li {
    margin-top: .4rem
}

ol ol,
ol ul,
ul ol,
ul ul {
    margin-bottom: 0
}

mark {
    padding: 3px 6px;
    background: var(--nc-ac-1);
    color: var(--nc-ac-tx)
}

input,
select,
textarea {
    padding: 12px 16px;
    margin-bottom: .5rem;
    background: rgba(255,255,255,0.8);
    color: var(--nc-tx-2);
    border: 1px solid var(--nc-bg-3);
    border-radius: 12px;
    box-shadow: none;
    box-sizing: border-box;
    font-family: var(--nc-font-sans);
    font-size: 17px;
    line-height: 1.47059;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

img {
    max-width: 100%
}

img,
nav {
    margin-bottom: 0
}

.table-container {
    overflow-x: auto;
    margin-bottom: 1rem;
    width: 100%;
}

.table-container::-webkit-scrollbar {
    height: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: var(--nc-bg-2);
}

.table-container::-webkit-scrollbar-thumb {
    background-color: var(--nc-bg-3);
    border-radius: 4px;
}

.table-container {
    scrollbar-width: thin;
    scrollbar-color: var(--nc-bg-3) var(--nc-bg-2);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="number"],
textarea {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
    max-width: 100%;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--nc-lk-1);
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.1);
    background-color: #FFFFFF;
}

@media screen and (max-width: 480px) {
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="search"],
    input[type="tel"],
    input[type="url"],
    input[type="number"],
    textarea {
        font-size: 16px;
        padding: 10px 14px;
    }
}

::placeholder {
    color: #999;
    opacity: 1;
}

:-ms-input-placeholder {
    color: #999;
}

::-ms-input-placeholder {
    color: #999;
}

.ssi {
    background-color: var(--nc-ac-1);
    color: var(--nc-ac-tx);
}

@media (max-width: 768px) {
    body {
        padding: 0;
        border-radius: 0;
    }
    header {
        margin: 0 0 var(--nc-space-3);
        border-radius: var(--nc-radius-md);
        padding: var(--nc-space-3) var(--nc-space-2);
    }
    address,
    area,
    article,
    aside,
    audio,
    blockquote,
    datalist,
    details,
    dl,
    fieldset,
    figure,
    form,
    iframe,
    input,
    meter,
    ol,
    optgroup,
    option,
    output,
    p,
    pre,
    progress,
    ruby,
    section,
    table,
    textarea,
    ul,
    video {
        margin-bottom: 0.75rem;
    }
    h1, h2, h3 {
        margin-bottom: 6px;
        padding-bottom: 0;
        border-bottom: 1px solid var(--nc-bg-2);
    }
    pre,
    details,
    blockquote {
        box-shadow: none;
        border: 1px solid var(--nc-bg-3);
        padding: 12px;
        background: #fff;
    }
    table {
        box-shadow: none;
        border-radius: 8px;
        min-width: 100%;
    }
    td,
    th {
        padding: 8px 10px;
    }
    .table-container {
        margin-bottom: 0.5rem;
    }
    .table-container::-webkit-scrollbar {
        height: 6px;
    }
    input,
    select,
    textarea {
        padding: 10px 12px;
        border-radius: 10px;
        box-shadow: none;
    }
    a button,
    button,
    input[type=button],
    input[type=reset],
    input[type=submit] {
        padding: 10px 16px;
        border-radius: 10px;
    }
    fieldset {
        padding: 1rem;
        border-radius: 10px;
    }
    ol,
    ul {
        padding-left: 1.25rem;
    }
}
