
:root {
    --bg: #0d0d0d;
    --surface: #161616;
    --card: #1e1e1e;
    --border: #2a2a2a;
    --accent: #f0c040;
    --accent2: #e05a2b;
    --text: #f0ede8;
    --muted: #888;
    --radius: 10px;
}

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

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Noto Sans JP', sans-serif; 
    font-size: 15px;
    line-height: 1.6;
}

header {
    background: var(--surface);
    border-bottom: 2px solid var(--accent);
    padding: 28px 40px 22px;
    display: flex;
    align-items: flex-end;
    gap: 20px;
}
header .badge {
    background: var(--accent);
    color: #000;
    font-family: 'Noto Sans JP', sans-serif; 
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    white-space: nowrap;
}
header h1 {
    font-family: 'Dela Gothic One', sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.1;
}
header h1 span { color: var(--accent); }

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 30px 60px;
}

section { margin-bottom: 60px; }
section > h2 {
    font-family: 'Dela Gothic One', sans-serif;
    font-size: 13px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent2);
    border-left: 3px solid var(--accent2);
    padding-left: 10px;
    margin-bottom: 24px;
}

.demo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 50px;
}
.demo-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.demo-card .demo-area {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.demo-card button.trigger-btn {
    background: var(--accent);
    color: #000;
    border: none;
    font-family: 'Dela Gothic One', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity .2s;
    align-self: flex-start;
}
.demo-card button.trigger-btn:hover { opacity: .8; }

.demo-card .stop-btn {
    background: var(--accent2);
    color: #fff;
    border: none;
    font-family: 'Dela Gothic One', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity .2s;
}
.demo-card .stop-btn:hover { opacity: .8; }

.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
table.ref-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
table.ref-table thead tr {
    background: var(--accent);
    color: #000;
}
table.ref-table thead th {
    font-family: 'Dela Gothic One', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 14px 16px;
    text-align: left;
    white-space: nowrap;
}
table.ref-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background .15s;
}
table.ref-table tbody tr:hover { background: rgba(240,192,64,.05); }
table.ref-table tbody tr:nth-child(even) { background: rgba(255,255,255,.02); }
table.ref-table tbody tr:nth-child(even):hover { background: rgba(240,192,64,.05); }
table.ref-table td {
    padding: 12px 16px;
    vertical-align: top;
}
table.ref-table td:first-child {
    font-family: 'Dela Gothic One', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: var(--accent);
    white-space: nowrap;
}
table.ref-table td.desc { color: var(--text); max-width: 180px; }
table.ref-table td.code {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #a8e6cf;
    white-space: pre-wrap;
    max-width: 260px;
}
table.ref-table td.instr { color: var(--muted); max-width: 200px; font-size: 13px; }
table.ref-table td.result { max-width: 160px; }

.res-text   { font-size: 13px; color: var(--text); }
.res-box    { display: inline-block; width: 32px; height: 32px; background: green; border-radius: 4px; }
.res-img    { width: 48px; height: 48px; object-fit: cover; border-radius: 4px; }
.res-btn    { background: #333; color: var(--text); border: 1px solid var(--border); padding: 4px 10px; border-radius: 4px; font-size: 12px; cursor: pointer; }
.res-link   { color: var(--accent); font-size: 13px; }
.res-count  { font-size: 13px; color: var(--accent2); }
.res-h      { font-size: 14px; color: var(--text); }
.res-hidden { display: none; }

footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    text-align: center;
    padding: 20px;
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 1px;
}
footer span { color: var(--accent); font-weight: 700; }


#txt1, #txt2    { font-size: 16px; font-weight: 500; }
#div1           { height: 50px; background: green; width: 50px; border-radius: 4px; }
#img1, #img3, #img5 { width: 100px; height: 100px; object-fit: cover; border-radius: 6px; display: block; }
#img2           { width: 100px; height: 100px; object-fit: cover; border-radius: 6px; display: block; }
#img4-wrap      { position: relative; height: 110px; width: 100%; overflow: hidden; }
#img4           { position: absolute; left: 0; top: 0; width: 100px; height: 100px; object-fit: cover; border-radius: 6px; }
#h3_1           { font-size: 18px; color: var(--text); }
#h1_1           { font-size: 22px; color: var(--text); }
#h2_1           { font-size: 20px; color: var(--text); display: none; }
#a1             { color: var(--muted); font-size: 14px; }
#spn1           { font-size: 16px; color: var(--accent2); font-weight: 700; }
#tbl1           { width: 100%; border-collapse: collapse; font-size: 13px; }
#tbl1 th        { background: var(--accent); color: #000; padding: 6px 10px; font-family: 'Dela Gothic One', sans-serif; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; }
#tbl1 td        { padding: 6px 10px; border-bottom: 1px solid var(--border); }
#btnf15         { background: #333; color: var(--text); border: 1px solid var(--border); padding: 8px 14px; border-radius: 6px; cursor: pointer; font-size: 13px; }
#typewriter     { font-family: 'Courier New', monospace; font-size: 15px; color: var(--accent); min-height: 26px; }