:root { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #1b2939; background: #f3f5f8; --accent: #1f59a6; --text-size: 22px; color-scheme: light; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: var(--accent); }
button, select { font: inherit; }
button, .button-link { cursor: pointer; border-radius: 12px; padding: 12px 17px; font-weight: 600; transition: background .15s; }
button:disabled, select:disabled { opacity: .5; cursor: default; }
button:focus-visible, a:focus-visible, select:focus-visible, canvas:focus-visible { outline: 3px solid #76a5ed; outline-offset: 4px; }
.primary { background: var(--accent); color: white; border: 1px solid var(--accent); }
.primary:hover:not(:disabled) { background: #174884; }
.secondary { background: #edf3fb; color: var(--accent); border: 1px solid #d5e2f3; }
.secondary:hover:not(:disabled) { background: #dfebfa; }
.quiet { background: transparent; color: var(--accent); border: 0; padding: 7px 0; font-size: 14px; }
.quiet:hover:not(:disabled) { text-decoration: underline; }
.site-header { height: 80px; padding: 0 max(24px, calc((100vw - 1120px) / 2)); display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #e1e6ed; background: #fbfcfd; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #1b2939; font-weight: 700; font-size: 19px; white-space: nowrap; }
.brand-icon { width: 36px; height: 36px; display: grid; place-items: center; background: var(--accent); color: white; border-radius: 10px; font-size: 24px; font-weight: 400; }
nav { display: flex; gap: 8px; }
nav a { text-decoration: none; font-size: 14px; font-weight: 600; padding: 10px 13px; border-radius: 10px; color: #657387; }
nav a[aria-current="page"] { background: #e9f0fa; color: var(--accent); }
#history-count { font-size: 11px; background: #dde6f3; color: #476385; border-radius: 7px; padding: 2px 6px; margin-left: 3px; }
main { max-width: 1168px; margin: auto; padding: 42px 24px 72px; }
.intro { margin-bottom: 32px; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 2px; color: var(--accent); margin: 0 0 13px; }
.eyebrow span { font-size: 21px; vertical-align: middle; margin-right: 7px; }
h1 { font-size: clamp(34px, 4vw, 44px); line-height: 1.13; letter-spacing: -1.5px; margin: 0 0 13px; }
.intro > p:last-child, .page-intro > p { color: #657387; line-height: 1.6; }
h2 { font-size: 17px; letter-spacing: -.2px; margin: 0 0 18px; }
p { line-height: 1.6; }
.workspace { display: grid; grid-template-columns: 350px minmax(0, 1fr); gap: 28px; align-items: start; }
.card { padding: 23px; background: white; border: 1px solid #e3e8ee; border-radius: 18px; box-shadow: 0 3px 10px #21354703; margin-bottom: 20px; }
.card h2 { display: flex; align-items: center; gap: 9px; }
.step { color: var(--accent); background: #edf3fb; border-radius: 50%; width: 25px; height: 25px; display: inline-grid; place-items: center; font-size: 12px; }
.language-card label { display: block; font-size: 12px; font-weight: 500; color: #657387; margin-bottom: 8px; }
select { border: 1px solid #dbe3ec; border-radius: 11px; width: 100%; background: #f9fafc; color: #1b2939; padding: 12px; font-size: 16px; }
.photo-empty { display: flex; flex-direction: column; align-items: center; text-align: center; border-radius: 12px; background: #f3f7fc; padding: 28px 14px; margin-bottom: 18px; }
.viewfinder { color: var(--accent); border: 2px solid #a2bfdf; border-radius: 9px; width: 48px; height: 48px; display: grid; place-items: center; font-size: 28px; margin-bottom: 18px; }
.photo-empty strong { font-size: 15px; }
.photo-empty p { color: #788596; font-size: 13px; margin: 8px 0 0; }
#photo-preview { width: 100%; max-height: 420px; object-fit: contain; border-radius: 12px; display: block; background: #f3f5f8; }
.photo-tools { display: flex; justify-content: space-between; margin: 9px 0 13px; }
.photo-tools:has(button[hidden]):not(:has(button:not([hidden]))) { display: none; }
.upload-buttons { display: flex; gap: 10px; }
.upload-buttons button { flex: 1; font-size: 13px; padding: 12px 8px; white-space: nowrap; }
.upload-buttons span { margin-right: 4px; }
.subtle, .privacy { color: #748194; font-size: 13px; line-height: 1.6; }
.privacy { margin: 0 5px; font-size: 12px; }
#photo-status:empty { display: none; }
.result-empty { border: 1px dashed #ccd7e4; border-radius: 18px; padding: 60px 38px; text-align: center; margin-top: 0; color: #657387; }
.result-empty > span { color: #93a8c2; font-size: 45px; font-weight: 300; display: block; margin-bottom: 23px; }
.result-empty h2 { color: #52657e; margin-bottom: 12px; font-size: 20px; }
.result-empty p { max-width: 370px; margin: auto; font-size: 14px; }
.result-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; min-height: 24px; font-size: 13px; color: #657387; }
.result-toolbar > div { display: flex; align-items: center; gap: 9px; }
.pulse { width: 7px; height: 7px; background: var(--accent); border-radius: 50%; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }
.font-tools { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 17px; font-size: 13px; font-weight: 500; }
.font-tools > div { display: flex; align-items: center; gap: 12px; }
.font-button { color: var(--accent); border: 1px solid #dce4ee; background: white; padding: 8px 12px; min-width: 45px; font-size: 16px; }
output { min-width: 36px; color: #657387; font-variant-numeric: tabular-nums; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 15px; }
.section-heading h2 { margin: 0; }
.language-badge { color: var(--accent); background: #eff4fc; border-radius: 6px; padding: 4px 7px; font-size: 11px; }
.result-text { font-size: var(--text-size); white-space: pre-wrap; line-height: 1.7; overflow-wrap: anywhere; margin: 0 0 15px; }
.result-text:empty { display: none; }
.result-actions { display: flex; gap: 24px; }
.error { color: #a12b32; font-size: 14px; }
.notice { padding: 11px 14px; background: #fff5e6; border: 1px solid #f4e0bf; color: #8b5e22; border-radius: 10px; font-size: 13px; line-height: 1.6; margin: 0 0 18px; }
.page-intro { margin-bottom: 30px; }
.history-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.history-item { background: white; border: 1px solid #e3e8ee; border-radius: 16px; display: flex; flex-direction: column; }
.history-item a { padding: 22px 23px; text-decoration: none; flex: 1; color: #1b2939; }
.history-item a:hover { background: #fafcff; border-radius: 16px; }
.history-item h2 { color: var(--accent); margin: 0 0 10px; }
.history-item p { white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 12px 0; }
.history-item time { font-size: 12px; color: #7d899a; }
.history-item .history-footer { display: flex; align-items: center; justify-content: space-between; padding: 0 23px 17px; gap: 12px; font-size: 12px; color: #748194; }
.history-footer button { color: #8893a1; padding: 4px; font-size: 12px; }
.empty-state { text-align: center; padding: 55px 20px; color: #748194; }
.empty-state > span { font-size: 42px; display: block; margin-bottom: 20px; }
.empty-state h2 { color: #46566d; font-size: 21px; }
.button-link { display: inline-block; text-decoration: none; margin-top: 14px; font-size: 14px; }
#detail-page { max-width: 800px; margin: 0 auto; }
.back-link { text-decoration: none; font-size: 14px; }
.detail-heading { margin: 28px 0; }
.detail-heading h1 { font-size: 30px; }
dialog { padding: 25px; border: 1px solid #dce4ee; border-radius: 20px; width: min(800px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); overflow: auto; background: #f8fafc; color: #1b2939; }
dialog::backdrop { background: #13243ca6; }
.crop-header, .crop-footer { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.crop-header h2 { margin: 0; font-size: 21px; }
#crop-canvas { display: block; width: 100%; height: auto; touch-action: none; border-radius: 9px; margin: 17px auto; }
.crop-footer p { font-size: 12px; text-align: center; }
.keyboard-hint { font-size: 11px; color: #748194; margin: 17px 0 0; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #1b2939; color: white; padding: 12px 20px; border-radius: 12px; font-size: 14px; max-width: calc(100vw - 40px); z-index: 10; }
@media (max-width: 760px) { .workspace { grid-template-columns: 1fr; gap: 24px; } .site-header { height: 70px; padding: 0 18px; } .brand { font-size: 16px; gap: 7px; } .brand-icon { width: 31px; height: 31px; font-size: 22px; } nav { gap: 2px; } nav a { padding: 9px; font-size: 13px; } main { padding: 30px 18px 60px; } .intro { margin-bottom: 26px; } .history-list { grid-template-columns: 1fr; } .result-empty { padding: 40px 25px; } .crop-footer { flex-wrap: wrap; } .crop-footer p { flex: 1; } }
@media (max-width: 380px) { #history-count { display: none; } .site-header { gap: 8px; padding: 0 12px; } .brand { font-size: 14px; } nav a { padding: 8px 6px; } }
