body { --lab-radius: 16px; }
body #title-nav #vivia-logo { transform: none !important; background: transparent; border: 0; box-shadow: none; border-radius: 0; width: 34px; height: 34px; }
body #title-nav #vivia-logo::before, body #title-nav #vivia-logo::after { display: none; }
body #title-nav .site-mark { display: block; width: 34px; height: 34px; transform: none; }

body .hero { padding-bottom: 28px; min-height: 400px; }
body .hero-purpose { margin: 12px 0 0; color: var(--lab-accent-strong); font-size: .8rem; letter-spacing: .08em; }
body .hero-title span { font-size: .3em; margin-top: 14px; }
body .hero-description { margin-top: 20px; }

.portfolio-preview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.portfolio-preview-card { display: flex; gap: 20px; align-items: start; padding: 26px; border: 1px solid var(--lab-border); border-radius: 20px; color: var(--lab-text); background: linear-gradient(130deg, var(--lab-panel-solid), var(--lab-bg-soft)); transition: border-color .2s, transform .2s; }
.portfolio-preview-card:hover { border-color: var(--lab-accent); transform: translateY(-3px); }
.portfolio-preview-card h3 { margin: 10px 0; font-size: 1.15rem; }
.portfolio-preview-card p { margin: 0 0 16px; color: var(--lab-text-muted); line-height: 1.8; font-size: .9rem; }
.case-eyebrow { font: 600 .76rem/1.3 "Roboto Mono", monospace; letter-spacing: .06em; color: var(--lab-accent-strong); }
.case-symbol { display: grid; place-items: center; flex: 0 0 48px; width: 48px; height: 48px; border-radius: 14px; background: var(--lab-accent-soft); color: var(--lab-accent-strong); border: 1px solid var(--lab-border-strong); font: 700 1.4rem/1 system-ui; }
.pixel-symbol { color: var(--lab-blue); border-color: var(--lab-border); background: rgba(116, 174, 232, .1); }

body #footer { display: block; box-sizing: border-box; height: auto; min-height: 0; width: 100%; margin-top: 40px; padding: 0; border-top: 1px solid var(--lab-border); }
body #footer-wrapper { height: auto; min-height: 0; }
body #footer-info { box-sizing: border-box; width: 100%; max-width: 1120px; margin: auto; padding: 34px 24px 42px; }
body .footer-row.footer-layout { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: start; text-align: left; justify-content: normal; font-size: .83rem; }
.footer-brand { display: flex; align-items: start; gap: 14px; min-width: 0; }
.footer-brand img { flex: 0 0 36px; }
.footer-brand strong { display: block; color: var(--lab-text); font-size: 1.05rem; letter-spacing: -.02em; }
body .footer-brand p { margin: 9px 0; line-height: 1.6; text-indent: 0; color: var(--lab-text-muted); }
.footer-brand small { display: block; font-size: .75rem; color: var(--lab-text-faint); }
.footer-directory { display: grid; grid-template-columns: repeat(2, minmax(100px, 1fr)); gap: 32px; }
body .footer-links { display: flex; flex-direction: column; align-items: start; justify-content: start; gap: 0; }
.footer-label { display: block; padding: 0 0 8px; color: var(--lab-text); font-weight: 700; }
body .footer-links a { display: inline-flex; align-items: center; min-height: 36px; overflow-wrap: anywhere; line-height: 1.5; }

body:has(.business-page) #sidebar { display: none; }
body:has(.community-page) #sidebar-wrapper { display: none; }
body:has(.community-page) #main-grid { grid-template-columns: minmax(0, 1fr); }
body:has(.community-page) #main-grid #nav, body:has(.community-page) #main-grid #content-body, body:has(.community-page) #main-grid #footer-wrapper { grid-column: 1 / -1; }
body .community-page .community-hero { padding: 8px 0 20px; }
body .community-hero .community-title { margin: 12px 0 16px; line-height: 1.35; padding: 0; background: transparent; }
body:has(.business-page) #main-grid { grid-template-columns: minmax(0, 1fr); }
body:has(.business-page) .article-header { display: none; }
body:has(.business-page) .article-inner { border: 0; box-shadow: none; background: transparent; }
body:has(.business-page) .article-entry { padding: 30px 16px; }
.business-page { width: min(1060px, 100%); }
body .business-page h2, body .business-page h3 { background: transparent; box-shadow: none; border: 0; padding-left: 0; }
body .business-page h2::before, body .business-page h3::before { display: none; }
.business-hero { padding: 36px 0 28px; max-width: 760px; }
body .business-hero h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); line-height: 1.3; margin: 15px 0 22px; color: var(--lab-text); text-wrap: balance; letter-spacing: -.04em; white-space: pre-line; }
body .business-page .community-lead { max-width: 650px; font-size: 1.05rem; }
body .business-note { color: var(--lab-text-faint); font-size: .8rem; line-height: 1.8; margin: 16px 0 0; }
body .business-section { padding-top: 40px; margin-top: 36px; border-top: 1px solid var(--lab-border); scroll-margin-top: 100px; }
body .business-section h2 { margin-top: 8px; padding: 0; border: 0; font-size: clamp(1.45rem, 3vw, 2rem); color: var(--lab-text); }
.solution-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.solution-grid article { padding: 20px 0; border-top: 2px solid var(--lab-border-strong); }
.solution-grid article > span { color: var(--lab-accent); font: .76rem/1.5 monospace; }
body .solution-grid h3 { color: var(--lab-text); font-size: 1.1rem; margin: 12px 0; }
body .business-page p { text-indent: 0; line-height: 1.85; }
body .case-study { padding: 28px; margin-top: 22px; border: 1px solid var(--lab-border); border-radius: 20px; background: var(--lab-panel); scroll-margin-top: 110px; }
.case-heading { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.case-heading > div { flex: 1; min-width: min(200px, 100%); }
body .case-heading h3 { margin: 6px 0 0; font-size: 1.3rem; }
.case-tech { font-size: .76rem; line-height: 1.8; color: var(--lab-accent-strong); }
.case-details { margin: 18px 0; border-block: 1px solid var(--lab-border); }
.case-details summary { padding: 14px 0; min-height: 44px; cursor: pointer; font-weight: 600; color: var(--lab-text); }
.case-details p { font-size: .9rem; }
.business-process { list-style: none !important; counter-reset: process; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0 !important; gap: 18px; }
.business-process li { counter-increment: process; border-top: 1px solid var(--lab-border-strong); padding-top: 14px; }
.business-process li::before { content: '0' counter(process); display: block; font: .75rem/1.6 monospace; color: var(--lab-accent); margin-bottom: 10px; }
.inquiry-section { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 42px; }
.inquiry-form { padding: 26px; background: var(--lab-panel-solid); border: 1px solid var(--lab-border); border-radius: 20px; display: grid; gap: 18px; }
.inquiry-form label { display: grid; gap: 9px; min-width: 0; font-size: .86rem; }
.inquiry-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.inquiry-form input:not([type=checkbox]), .inquiry-form select, .inquiry-form textarea { width: 100%; max-width: 100%; box-sizing: border-box; border: 1px solid var(--lab-border); border-radius: 9px; background: var(--lab-bg-soft); color: var(--lab-text); font: inherit; padding: 12px; min-height: 44px; }
.inquiry-form textarea { resize: vertical; min-height: 120px; }
.inquiry-form .inquiry-consent { display: flex; align-items: start; gap: 10px; line-height: 1.7; }
.inquiry-consent input { flex: 0 0 auto; margin-top: 5px; accent-color: var(--lab-accent); width: 17px; height: 17px; }
#inquiryFeedback { margin: 0; font-size: .86rem; line-height: 1.7; color: var(--lab-accent-strong); }
.inquiry-form button:disabled { opacity: .6; cursor: wait; }

body .anonymous-page .community-hero { padding-bottom: 22px; }
body .anonymous-page .anonymous-notice { margin-top: 16px; padding: 12px 16px; }
body .anonymous-page .anonymous-card { padding: 22px; }
body .anonymous-page textarea { min-height: 110px; }
body .reply-wall-panel { padding: 0; border: 0; background: transparent; box-shadow: none; }
body .anonymous-reply-list { gap: 0; }
body .anonymous-reply-card { padding: 14px 0; margin: 0; min-height: 0; }
body .reply-card-head { margin-bottom: 7px; }
body .reply-question-copy, body .reply-answer-copy { font-size: .92rem; line-height: 1.7; margin: 0; }
body .reply-answer { margin-top: 9px; padding: 10px 12px; border-radius: 8px; }
body .reply-role { margin-bottom: 4px; letter-spacing: .025em; }
body .reply-wall-hero .community-title { font-size: clamp(1.75rem, 4vw, 2.6rem); }
body .reply-wall-hero { margin-bottom: 24px; }
.reply-wall-controls { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(130px, .7fr) auto; gap: 14px; align-items: end; margin: 18px 0 8px; }
.reply-wall-controls label { display: block; margin-bottom: 8px; font-size: .8rem; }
.reply-wall-controls input, .reply-wall-controls select { box-sizing: border-box; width: 100%; min-height: 44px; padding: 10px 12px; background: var(--lab-bg-soft); color: var(--lab-text); border: 1px solid var(--lab-border); border-radius: 9px; font: inherit; }
.reply-wall-controls button { min-height: 44px; white-space: nowrap; }
.reply-filter-help { font-size: .78rem; color: var(--lab-text-faint); }
.article-machine-translation { flex-wrap: wrap; gap: 16px; align-items: center; }
.translation-actions { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; }
.translation-target { display: grid; gap: 5px; font-size: .76rem; }
.translation-target select, .translation-actions button { min-height: 40px; background: var(--lab-bg-soft); color: var(--lab-text); border: 1px solid var(--lab-border); border-radius: 8px; font: inherit; padding: 8px 12px; }
.translation-actions button { cursor: pointer; }
.translation-actions button:disabled { opacity: .5; cursor: default; }
.reply-answer-details summary, .reply-content-details summary { min-height: 44px; padding: 8px 0; color: var(--lab-accent-strong); cursor: pointer; font-size: .8rem; }

@media (max-width: 760px) {
  .portfolio-preview-grid, .inquiry-section { grid-template-columns: minmax(0, 1fr); }
  .portfolio-preview-card { padding: 20px; gap: 16px; }
  .solution-grid { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .business-process { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inquiry-section { gap: 26px; }
  body .footer-row.footer-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .footer-directory { gap: 22px; }
  body #footer-info { padding-inline: 16px; }
  body .business-hero { padding-top: 10px; }
  body .business-section { padding-top: 26px; margin-top: 26px; }
  body .case-study { padding: 20px; }
  .inquiry-form { padding: 20px; }
}

@media (max-width: 420px) {
  .inquiry-fields { grid-template-columns: minmax(0, 1fr); }
  .reply-wall-controls { grid-template-columns: minmax(0, 1fr); }
  .case-heading > .text-link { width: 100%; }
  .case-symbol { flex-basis: 40px; width: 40px; height: 40px; }
  .portfolio-preview-card { gap: 12px; }
}

@media (prefers-reduced-motion: reduce) { .portfolio-preview-card { transition: none; } .portfolio-preview-card:hover { transform: none; } }
