:root{color-scheme:light;--bg:#fff;--panel:#fafafa;--text:#242424;--muted:#929292;--line:#ededed;--blue:#3478e5;--red:#e60012;--radius:16px}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--text);font:16px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;-webkit-font-smoothing:antialiased}
body.sheet-open{overflow:hidden}
button,input,select,textarea{font:inherit;color:inherit}
button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}
a{color:inherit;text-decoration:none}
button,a{touch-action:manipulation}
button{cursor:pointer;border:0;background:none;padding:12px 16px;min-height:44px;border-radius:8px}
button:disabled{color:#c6c6c6;cursor:default}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:2px solid var(--blue);outline-offset:3px}
button:active:not(:disabled){opacity:.65}
.topbar{height:70px;max-width:800px;margin:0 auto;display:flex;align-items:center;justify-content:space-between;padding:12px 24px;border-bottom:1px solid var(--line)}
.brand{font-size:17px;display:flex;gap:9px;align-items:center}
.brand b{font-weight:600}
.mark{display:grid;place-items:center;background:var(--red);color:white;width:28px;height:28px;border-radius:7px;font-size:21px;font-weight:800}
#account{display:flex;align-items:center;gap:8px;font-size:13px;color:#777}
#account span{max-width:140px;overflow:hidden;text-overflow:ellipsis}
#account button{padding:8px}
main{max-width:760px;margin:0 auto;padding:30px 20px 60px;min-height:calc(100dvh - 70px)}
footer{display:none}
h1,h2,h3,p{margin-top:0}
h1{font-size:28px;line-height:1.25;margin-bottom:12px;font-weight:600;letter-spacing:-.5px}
h2{font-size:18px;margin-bottom:14px;font-weight:600}
h3{font-size:16px;margin-bottom:8px}
.muted,.hint{color:var(--muted)}
.hint{font-size:13px;margin:14px 0 0;line-height:1.5}
.row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.between{justify-content:space-between}
.head{margin-bottom:24px}
.head p{font-size:14px;margin-bottom:0;color:#888}
.head #refresh{color:var(--blue)}
.panel{background:var(--panel);border-radius:var(--radius);padding:22px;margin-bottom:20px}
.login{max-width:420px;margin:6vh auto;background:#fff;padding:8px}
.login h1{font-size:25px}
.label{display:block;font-size:13px;color:#888;margin:18px 0 8px}
input,select,textarea{width:100%;padding:13px 15px;border:0;border-radius:10px;background:#f6f6f6;min-height:48px;font-size:16px}
input::placeholder,textarea::placeholder{color:#999}
textarea{min-height:130px;resize:vertical}
.primary{background:var(--red);color:#fff;border-radius:9px;font-weight:500}
.primary:disabled{background:#eee;color:#aaa}
.login .primary{width:100%;margin-top:24px}
.full{width:100%}
.space-top{margin-top:20px}
.text-action{color:var(--blue);padding:10px 0;background:transparent}
.quick-action{display:block;color:var(--blue);background:#f4f7fd;width:100%;text-align:left;padding:14px 16px;margin:14px 0 18px;border-radius:10px}
.icon-button{display:grid;place-items:center;width:44px;height:44px;min-height:44px;padding:0;font-size:30px;line-height:1;border-radius:8px}
#notice{position:fixed;top:max(12px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);z-index:15;width:max-content;max-width:calc(100% - 32px);background:#fff4f3;border:1px solid #f1d8d4;padding:12px 16px;border-radius:10px;font-size:14px;color:#853e36;white-space:pre-line}
#notice.good{background:#f0f8f0;border-color:#dcebdc;color:#3c6c41}
#sheet-error{background:#fff3f1;padding:12px 14px;border-radius:10px;margin-bottom:14px;color:#9c3e30;font-size:14px}
.toolbar{display:flex;align-items:center;gap:12px;margin-bottom:16px}
.toolbar input{flex:1;min-width:0}
.toolbar select{width:175px;font-size:14px}
.filters{display:flex;gap:5px;overflow-x:auto;margin-bottom:20px;scrollbar-width:none}
.filters button{font-size:13px;white-space:nowrap;background:#f6f6f6;padding:8px 12px;min-height:38px}
.filters button[aria-pressed=true]{background:#eaeaea;color:#222}
.count{font-size:12px;color:#929292;margin-left:5px}
.ticket-list{display:grid;gap:12px}
.ticket{display:block;padding:18px 20px;background:var(--panel);border-radius:14px}
.ticket h2{font-size:16px;line-height:1.45;margin:7px 0 5px}
.ticket p{font-size:13px;color:#888;margin-bottom:0}
.number{font-size:12px;color:#8b8b8b;font-variant-numeric:tabular-nums}
.right{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:13px}
.badge{display:inline-block;padding:3px 12px;border-radius:8px;background:#555;color:#fff;font-size:12px;line-height:1.5}
.right .badge{padding:0;background:none;color:#777;font-size:12px}
.right .badge.bad{color:#c43535}
.right .badge.warn{color:#a47421}
.pager{display:flex;justify-content:center;align-items:center;gap:20px;margin:24px 0;font-size:14px;color:#888}
.pager button{color:var(--blue);background:#f8f8f8}
.pager button:disabled{color:#ccc}
.ticket-mode .topbar{display:none}
.ticket-mode main{max-width:620px;padding:12px 20px 60px;min-height:100dvh}
.incident-nav{display:grid;grid-template-columns:44px 1fr 44px;align-items:center;margin:0 -10px 16px}
.incident-nav>span{text-align:center;font-size:12px;font-variant-numeric:tabular-nums}
.incident-nav button{font-size:22px;color:#999}
.incident-title{text-align:center;font-size:18px;line-height:1.5;margin:12px 0 22px;font-weight:600;letter-spacing:0}
.tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));background:#eaeaea;border-radius:9px;padding:3px;margin-bottom:20px}
.tabs button{padding:8px 2px;border-radius:7px;font-size:13px;min-height:36px;white-space:nowrap}
.tabs button.active{background:white;box-shadow:0 0 0 1px #e3e3e3}
.meta-panel{padding:20px 18px}
.meta-dates{display:flex;align-items:center;justify-content:space-between;gap:16px;font-size:13px;color:#969696;margin-bottom:14px}
.keyvals{display:grid;grid-template-columns:105px minmax(0,1fr);row-gap:8px;column-gap:12px;font-size:14px;align-items:center;margin:0}
.keyvals dt{font-size:12px;color:#999;letter-spacing:.1px}
.keyvals dd{margin:0;overflow-wrap:anywhere}
.keyvals .badge{min-width:94px;text-align:center}
.fields{padding:0 18px}
.field-row{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;text-align:left;border-bottom:1px solid #ebebeb;border-radius:0;padding:18px 0;min-height:83px}
.field-row:last-child{border-bottom:0}
.field-row>span:first-child{min-width:0}
.field-label{display:block;font-size:12px;color:#969696;letter-spacing:.2px;margin-bottom:6px}
.field-value{display:block;font-size:16px;line-height:1.45;overflow-wrap:anywhere}
.chevron{font-size:29px;line-height:1;color:var(--blue);font-weight:300;flex-shrink:0}
.field-row:disabled .chevron,.field-row:disabled .field-value{color:#c8c8c8}
.description{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.55}
.additional-title{margin-top:24px}
.linked-ci{padding:16px 0;border-top:1px solid var(--line)}
.linked-ci strong{font-size:15px;font-weight:500;display:block}
.linked-ci>span{display:block;font-size:12px;color:#999;margin-top:6px}
details.compact{padding:16px 20px;font-size:13px;color:#777}
details summary{cursor:pointer}
details .description{margin:16px 0;font-size:13px}
.history-toolbar{display:flex;justify-content:space-between;gap:12px;margin:0 0 12px}
.history-toolbar button{font-size:14px}
#history-sort{color:#444}
.history-item{padding:22px 18px}
.history-date{color:#999;font-size:12px;margin-bottom:16px}
.history-author{font-size:15px;font-weight:500;margin-bottom:8px}
.preset-trigger{display:block;font-size:14px;margin:-6px 0 18px 4px}
.solution-comment{background:#fafafa;min-height:90px;margin-top:0;border-radius:12px}
.empty,.loading{color:#999;font-size:14px;text-align:center;padding:32px 12px}
.loading:before{content:"";display:inline-block;width:12px;height:12px;border:1.5px solid #ddd;border-top-color:#777;border-radius:50%;vertical-align:-1px;margin-right:9px;animation:spin .8s linear infinite}
dialog{position:fixed;inset:auto 0 0;margin:0 auto;width:100%;max-width:620px;height:90dvh;max-height:calc(100dvh - env(safe-area-inset-top) - 20px);padding:0;border:0;border-radius:20px 20px 0 0;background:white;color:var(--text);overflow:hidden}
dialog::backdrop{background:rgb(0 0 0 / .52)}
.sheet-head{display:grid;grid-template-columns:44px 1fr 44px;align-items:center;border-bottom:1px solid var(--line);height:60px;padding:0 14px}
.sheet-head h2{grid-column:2;text-align:center;margin:0;font-size:16px;font-weight:600}
.sheet-head button{grid-column:3;color:#999;font-size:29px}
.sheet-body{overflow:auto;height:calc(100% - 60px);padding:20px 18px max(30px,env(safe-area-inset-bottom));overscroll-behavior:contain}
.search-input{background:#f8f8f8;border-radius:12px;padding:16px;margin-bottom:14px;min-height:52px}
.pick-row{display:flex;justify-content:space-between;align-items:center;gap:16px;width:100%;min-height:56px;padding:14px 0;text-align:left;border-radius:0}
.pick-title{display:block;font-size:16px;overflow-wrap:anywhere}
.pick-sub{display:block;font-size:12px;color:#999;margin-top:4px}
.pick-row>span:first-child{min-width:0}
.person-row{display:flex;align-items:center;gap:14px;min-height:74px;width:100%;padding:10px 0;text-align:left;border-radius:0}
.avatar{display:grid;place-items:center;width:42px;height:42px;border-radius:50%;background:#e9e9e9;color:#fff;font-size:14px;flex-shrink:0}
.person-row>span:last-child{overflow-wrap:anywhere}
.tree-back{color:#777;font-size:13px;display:block;text-align:left;padding-left:0}
.manual-ci{margin-top:20px;padding-top:10px;border-top:1px solid var(--line)}
.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@keyframes spin{to{transform:rotate(360deg)}}
@media(min-width:760px){dialog{inset:7vh 0 auto;height:84vh;border-radius:16px}.ticket-mode main{padding-top:24px}.incident-title{font-size:20px}.tabs{margin-bottom:24px}.panel{margin-bottom:20px}}
@media(max-width:420px){.topbar{padding-left:16px;padding-right:16px}main{padding:24px 16px 50px}.ticket-mode main{padding:8px 15px 45px}.panel{padding:20px 16px;margin-bottom:16px}.fields{padding:0 16px}.incident-title{font-size:17px}.tabs{margin-bottom:18px}.tabs button{font-size:12px}.toolbar{flex-wrap:wrap}.toolbar input{flex-basis:100%}.toolbar select{width:100%}.field-row{padding:16px 0}.sheet-body{padding-left:16px;padding-right:16px}.login{margin-top:3vh}.keyvals{grid-template-columns:92px 1fr}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;scroll-behavior:auto!important}}

/* Application navigation and intentionally sparse settings/login screens. */
.login-mode .topbar,.login-mode #bottom-nav{display:none}
.login-mode main{padding-top:0;min-height:100dvh}
.login{max-width:420px;margin:0 auto;padding:0 4px;background:none}
.login-brand{text-align:center;color:var(--red);font-size:30px;font-weight:700;padding:90px 0 72px;margin:0;letter-spacing:-.6px}
.login h2{font-size:19px;margin-bottom:24px}
.login input{margin-bottom:18px;min-height:56px;background:var(--panel)}
.login .primary{margin-top:64px;min-height:52px}
.login .primary:disabled{background:#f19aa2;color:white}
body:not(.ticket-mode):not(.login-mode) main{padding-top:22px;padding-bottom:110px}
.topbar{max-width:800px;gap:12px}
.brand{white-space:nowrap}
#account{flex:1;justify-content:flex-end;gap:14px;min-width:0}
#header-refresh{font-size:24px;width:38px;flex-shrink:0;color:#888}
#account>span{max-width:145px;font-size:13px}
html,body{touch-action:pan-x pan-y}
.sort-menu{width:190px;flex-shrink:0;min-width:0;text-align:left;font-size:13px;border:1px solid var(--line);padding:12px;border-radius:8px}
@media(max-width:420px){.toolbar .sort-menu{width:100%}}
.sort-options button{display:flex;justify-content:space-between;align-items:center;width:100%;min-height:48px;text-align:left;padding:12px 4px}
.sort-options button[aria-checked=true]{color:var(--blue);font-weight:600}
.sort-options h2{font-size:13px;color:var(--muted);margin:18px 0 8px}
.list-loading{min-height:180px;display:flex;align-items:center;justify-content:center;gap:12px;color:var(--muted);font-size:14px}
.list-spinner{width:20px;height:20px;border:2px solid var(--line);border-top-color:var(--red);border-radius:50%;animation:arm-spin .8s linear infinite}
#header-refresh[aria-busy=true]{animation:arm-spin .8s linear infinite}
#pager #load-more{width:100%;margin:12px 0}
@keyframes arm-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.list-spinner,#header-refresh[aria-busy=true]{animation:none}}
.page-title{text-align:center;font-size:17px;font-weight:500;letter-spacing:0;margin:0 0 28px}
#bottom-nav{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:800px;z-index:8;display:grid;grid-template-columns:repeat(3,1fr);background:var(--bg);border-top:1px solid var(--line);padding:8px 10px max(10px,env(safe-area-inset-bottom))}
#bottom-nav[hidden],.ticket-mode #bottom-nav{display:none}
#bottom-nav a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:54px;color:#949494;font-size:11px}
#bottom-nav a.active{color:var(--red)}
#bottom-nav svg{width:26px;height:26px}
.theme-picker,.search-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:3px;background:#eaeaea;border-radius:9px;margin-bottom:24px}
.theme-picker button,.search-tabs button{min-height:38px;padding:7px 3px;font-size:14px}
.theme-picker button[aria-pressed=true],.search-tabs button[aria-pressed=true]{background:var(--bg);box-shadow:0 0 0 1px var(--line)}
.logout-button{display:block;color:var(--red);margin:36px auto 0;font-size:16px}
#request-search{display:flex;align-items:center;gap:12px;margin-bottom:18px}
#request-search input{margin:0;min-width:0}
#request-search button{flex-shrink:0}
.selected-store{font-size:14px;color:var(--muted);margin:8px 0 18px}
#search-results .right>span{font-size:12px;color:var(--muted)}
[data-theme=dark]{color-scheme:dark;--bg:#141414;--panel:#1e1e1e;--text:#ededed;--muted:#9b9b9b;--line:#303030;--blue:#82acff;--red:#ff4c5a}
[data-theme=dark] input,[data-theme=dark] select,[data-theme=dark] textarea{background:#242424}
[data-theme=dark] .search-input,[data-theme=dark] .solution-comment{background:var(--panel)}
[data-theme=dark] .tabs,[data-theme=dark] .theme-picker,[data-theme=dark] .search-tabs{background:#292929}
[data-theme=dark] .tabs button.active{background:#444;box-shadow:none}
[data-theme=dark] .field-row{border-color:var(--line)}
[data-theme=dark] dialog{background:var(--bg)}
[data-theme=dark] .quick-action{background:#202b40}
[data-theme=dark] .avatar{background:#414141}
[data-theme=dark] #account,[data-theme=dark] #history-sort{color:#aaa}
[data-theme=dark] .primary:not(:disabled){color:white;background:#e60012}
[data-theme=dark] #notice.good{background:#213326;border-color:#304c38;color:#b5d4bb}
[data-theme=dark] #notice,[data-theme=dark] #sheet-error{background:#382321;border-color:#56332e;color:#efb3a9}
@media(max-width:420px){#account{gap:6px}#account>span{max-width:115px;font-size:12px}.brand{font-size:16px}.topbar{gap:8px}.login-brand{padding-top:80px;padding-bottom:66px}}
